Opened 14 years ago

Closed 14 years ago

#7861 closed patch (fixed)

Closed captions become "stuck"

Reported by: Jim Stichnoth <stichnot@…> Owned by: danielk
Priority: minor Milestone: 0.23-fixes
Component: MythTV - Video Playback Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Occasionally, the timecode for a closed caption is corrupt and is treated as a very large number, corresponding to a timecode far in the future. When this is encountered during playback, subsequent closed captions are blocked until a seek operation clears the caption buffer. The result is that the previous caption appears to be stuck (if the offending caption is a "clear" operation), or that no subsequent captions are displayed.

I have encountered this problem in ATSC broadcasts using the HDHR. More commonly, lossless transcodes of ATSC/HDHR recordings seem to sometimes corrupt some caption timecodes, though unfortunately I haven't been able to track down the source of the corruption in mythtranscode.

When a new caption is written to the buffer, this patch tries to guess whether the reader appears to be stuck waiting on a caption whose timestamp is too large. It does this by checking whether it is writing a timestamp that is smaller than the timestamp being waited on but larger than the previously read timestamp. For example, if the sequence of timestamps is 1000, 9999999, 2000, and the reader is waiting on 9999999, then the write of 2000 (which is between 1000 and 9999999) will deduce that the reader is stuck. When this happens, the timestamp that the reader is waiting on is reset to a value reasonably close to the previously read timestamp, so that it becomes unstuck.

Attachments (1)

unstick_captions.patch (1.7 KB) - added by Jim Stichnoth <stichnot@…> 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by Jim Stichnoth <stichnot@…>

Attachment: unstick_captions.patch added

comment:1 Changed 14 years ago by Stuart Auchterlonie

Milestone: unknown0.23
Version: unknownhead

comment:2 Changed 14 years ago by Janne Grunau

Owner: changed from Janne Grunau to danielk
Status: newassigned

Daniel should be more familiar with captions

comment:3 Changed 14 years ago by Stuart Auchterlonie

Milestone: 0.230.23-fixes

comment:4 Changed 14 years ago by danielk

Resolution: fixed
Status: assignedclosed

[24789] Fixes #7861. Deal with invalid CC timestamps in legacy captions by shortening them when the next caption arrives.

Note: See TracTickets for help on using tickets.