Skip to content

Commit

Permalink
Ensure that DVD subpictures that don't explicitly set the 'end' time …
Browse files Browse the repository at this point in the history
…are still shown. Also, handle 'CHG_COLCON' command by skipping over the data. This should prevent any issues caused by incorrectly interpreting the data as subpicture commands.

Fixes #11455
  • Loading branch information
Richard committed Jun 22, 2013
1 parent 3d589bc commit e5e9cc8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp
Expand Up @@ -1332,8 +1332,8 @@ bool DVDRingBuffer::DecodeSubtitles(AVSubtitle *sub, int *gotSubtitles,
bool force_subtitle_display = false;
sub->rects = NULL;
sub->num_rects = 0;
sub->start_display_time = 0;
sub->end_display_time = 0;
sub->start_display_time = startTime;
sub->end_display_time = 0xFFFFFFFF;

cmd_pos = GETBE16(spu_pkt + 2);
while ((cmd_pos + 4) < buf_size)
Expand All @@ -1351,8 +1351,6 @@ bool DVDRingBuffer::DecodeSubtitles(AVSubtitle *sub, int *gotSubtitles,
{
case 0x00:
force_subtitle_display = true;
sub->start_display_time = startTime;
sub->end_display_time = 0xFFFFFFFF;
break;
case 0x01:
sub->start_display_time = ((date << 10) / 90) + startTime;
Expand Down Expand Up @@ -1403,6 +1401,14 @@ bool DVDRingBuffer::DecodeSubtitles(AVSubtitle *sub, int *gotSubtitles,
pos +=4;
}
break;
case 0x07:
{
if ((buf_size - pos) < 2)
goto fail;

pos += GETBE16(spu_pkt + pos);
}
break;
case 0xff:
default:
goto the_end;
Expand Down

0 comments on commit e5e9cc8

Please sign in to comment.