From 0e7bdce907c0c40ec3c97a387404049a1aaaec7b Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 31 Mar 2016 21:37:32 +0200 Subject: demux_lavf: remove some old framerate guessing I don't trust it one bit, and it's a bother with the codecpar change. If it turns out to be important for some file formats, it could be added back (or FFmpeg fixed). --- demux/demux_lavf.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'demux') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index c6430f73f0..f911f0831b 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -588,21 +588,8 @@ static void handle_new_stream(demuxer_t *demuxer, int i) sh->codec->disp_w = codec->width; sh->codec->disp_h = codec->height; - /* Try to make up some frame rate value, even if it's not reliable. - * FPS information is needed to support subtitle formats which base - * timing on frame numbers. - * Libavformat seems to report no "reliable" FPS value for AVI files, - * while they are typically constant enough FPS that the value this - * heuristic makes up works with subtitles in practice. - */ - double fps; if (st->avg_frame_rate.num) - fps = av_q2d(st->avg_frame_rate); - else - fps = 1.0 / FFMAX(av_q2d(st->time_base), - av_q2d(st->codec->time_base) * - st->codec->ticks_per_frame); - sh->codec->fps = fps; + sh->codec->fps = av_q2d(st->avg_frame_rate); if (priv->format_hack.image_format) sh->codec->fps = demuxer->opts->mf_fps; sh->codec->par_w = st->sample_aspect_ratio.num; -- cgit v1.2.3