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, |
1331 | 1331 | bool force_subtitle_display = false; |
1332 | 1332 | sub->rects = NULL; |
1333 | 1333 | 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; |
1336 | 1336 | |
1337 | 1337 | cmd_pos = GETBE16(spu_pkt + 2); |
1338 | 1338 | while ((cmd_pos + 4) < buf_size) |
… |
… |
bool DVDRingBuffer::DecodeSubtitles(AVSubtitle *sub, int *gotSubtitles, |
1350 | 1350 | { |
1351 | 1351 | case 0x00: |
1352 | 1352 | force_subtitle_display = true; |
1353 | | sub->start_display_time = startTime; |
1354 | | sub->end_display_time = 0xFFFFFFFF; |
1355 | 1353 | break; |
1356 | 1354 | case 0x01: |
1357 | 1355 | sub->start_display_time = ((date << 10) / 90) + startTime; |
… |
… |
bool DVDRingBuffer::DecodeSubtitles(AVSubtitle *sub, int *gotSubtitles, |
1402 | 1400 | pos +=4; |
1403 | 1401 | } |
1404 | 1402 | break; |
| 1403 | case 0x07: |
| 1404 | { |
| 1405 | if ((buf_size - pos) < 2) |
| 1406 | goto fail; |
| 1407 | |
| 1408 | pos += GETBE16(spu_pkt + pos); |
| 1409 | } |
| 1410 | break; |
1405 | 1411 | case 0xff: |
1406 | 1412 | default: |
1407 | 1413 | goto the_end; |