Skip to content

Commit

Permalink
revert lavc/dvbsub_parser.c: fix intermittent DVB subtitles disappearing
Browse files Browse the repository at this point in the history
Originally from:
6aaf617

references:
https://code.mythtv.org/trac/ticket/5978
I could not find the referenced FFmpeg bugs from the comment or MythTV trac
since FFmpeg has changed its bug tracker. However, I did find
https://samples.ffmpeg.org/ffmpeg-bugs/roundup/issue378/Issue378/
which plays back with subtitles fine.

As far as I can tell the change reduces out_size by len + 6 if that section is
at the end of p.  However, that data is all in the buffer, so I don't see how
that would fix anything.  If this does actually fix something a new FFmpeg bug
report should be created with a sample.
  • Loading branch information
ulmus-scott committed Nov 14, 2024
1 parent 1a3df31 commit ea21a58
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mythtv/external/FFmpeg/libavcodec/dvbsub_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
{
len = AV_RB16(p + 4);

// MythTV #5978 "<=" -> "<"
// This is unresolved ffmpeg issue 378, use
// their solution if/when this is fixed upstream.
//if (len + 6 <= p_end - p)
if (len + 6 < p_end - p)
if (len + 6 <= p_end - p)
{
out_size += len + 6;

Expand Down

0 comments on commit ea21a58

Please sign in to comment.