Ticket #11455: 0001-Ensure-that-DVD-subpictures-that-don-t-explicitly-se.patch

File 0001-Ensure-that-DVD-subpictures-that-don-t-explicitly-se.patch, 2.1 KB (added by peper03@…, 8 years ago)
  • mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp

    From 00717665af4ddcf7a9290b97dd0891eb34251b0f Mon Sep 17 00:00:00 2001
    From: Richard <peper03@yahoo.com>
    Date: Wed, 13 Mar 2013 22:33:06 +0100
    Subject: [PATCH] Ensure that DVD subpictures that don't explicitly set the
     'end' time 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.
    
    ---
     mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp |   14 ++++++++++----
     1 file changed, 10 insertions(+), 4 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp b/mythtv/libs/libmythtv/DVD/dvdringbuffer.cpp
    index a7ef500..197ec8c 100644
    a b bool DVDRingBuffer::DecodeSubtitles(AVSubtitle *sub, int *gotSubtitles, 
    13311331    bool force_subtitle_display = false;
    13321332    sub->rects = NULL;
    13331333    sub->num_rects = 0;
    1334     sub->start_display_time = 0;
    1335     sub->end_display_time = 0;
     1334    sub->start_display_time = startTime;
     1335    sub->end_display_time = 0xFFFFFFFF;
    13361336
    13371337    cmd_pos = GETBE16(spu_pkt + 2);
    13381338    while ((cmd_pos + 4) < buf_size)
    bool DVDRingBuffer::DecodeSubtitles(AVSubtitle *sub, int *gotSubtitles, 
    13501350            {
    13511351                case 0x00:
    13521352                    force_subtitle_display = true;
    1353                     sub->start_display_time = startTime;
    1354                     sub->end_display_time   = 0xFFFFFFFF;
    13551353                break;
    13561354                case 0x01:
    13571355                    sub->start_display_time = ((date << 10) / 90) + startTime;
    bool DVDRingBuffer::DecodeSubtitles(AVSubtitle *sub, int *gotSubtitles, 
    14021400                    pos +=4;
    14031401                }
    14041402                break;
     1403                case 0x07:
     1404                {
     1405                    if ((buf_size - pos) < 2)
     1406                        goto fail;
     1407
     1408                    pos += GETBE16(spu_pkt + pos);
     1409                }
     1410                break;
    14051411                case 0xff:
    14061412                default:
    14071413                goto the_end;