Skip to content

Commit

Permalink
libavformat/utils.c: fixup create mythtv custom mpegts demuxer
Browse files Browse the repository at this point in the history
Since MythTV now allows forcing the use of FFmpeg's demuxer,
these comparisons need an additional comparison against
"mpegts-ffmpeg" for the behavior of both to be the same.

This bug presented itself as incorrect durations of files
when using the mpegts-ffmpeg demuxer.
  • Loading branch information
ulmus-scott authored and bennettpeter committed Jul 1, 2022
1 parent d1a2624 commit e599594
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mythtv/external/FFmpeg/libavformat/utils.c
Expand Up @@ -2957,7 +2957,8 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
}

if ((!strcmp(ic->iformat->name, "mpeg") ||
!strcmp(ic->iformat->name, "mpegts")) &&
!strcmp(ic->iformat->name, "mpegts") ||
!strcmp(ic->iformat->name, "mpegts-ffmpeg")) &&
file_size && (ic->pb->seekable & AVIO_SEEKABLE_NORMAL)) {
/* get accurate estimate from the PTSes */
estimate_timings_from_pts(ic, old_offset);
Expand Down Expand Up @@ -3670,7 +3671,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
max_subtitle_analyze_duration = 30*AV_TIME_BASE;
if (!strcmp(ic->iformat->name, "flv"))
max_stream_analyze_duration = 90*AV_TIME_BASE;
if (!strcmp(ic->iformat->name, "mpeg") || !strcmp(ic->iformat->name, "mpegts"))
if (!strcmp(ic->iformat->name, "mpeg") || !strcmp(ic->iformat->name, "mpegts") || !strcmp(ic->iformat->name, "mpegts-ffmpeg"))
max_stream_analyze_duration = 7*AV_TIME_BASE;
}

Expand Down

0 comments on commit e599594

Please sign in to comment.