From 66cf78e932956eaa7d5a9dab8766efbfc1431e55 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 23 May 2017 13:36:38 +0200 Subject: lavf: consider codec framerate for framerate detection Fixes detection of some TV sample as 24.5 FPS. With the patch applied, it's detected as 25 FPS. This is enabled for mpegts only. --- libavformat/mpegts.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat/mpegts.c') diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 3eff1522bd..4d2f5c6802 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2616,6 +2616,8 @@ static int mpegts_read_header(AVFormatContext *s) int len; int64_t pos, probesize = s->probesize; + s->internal->prefer_codec_framerate = 1; + if (ffio_ensure_seekback(pb, probesize) < 0) av_log(s, AV_LOG_WARNING, "Failed to allocate buffers for seekback\n"); -- cgit v1.2.3