diff options
author | wm4 <wm4@nowhere> | 2016-03-31 21:37:32 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-03-31 21:39:01 +0200 |
commit | 0e7bdce907c0c40ec3c97a387404049a1aaaec7b (patch) | |
tree | c157a059a6ef76149f61bd7bf65e8afafe9eee70 | |
parent | 02dfc2c0519fc45e6f800a75de93936e24822585 (diff) |
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).
-rw-r--r-- | demux/demux_lavf.c | 15 |
1 files changed, 1 insertions, 14 deletions
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; |