From dfe7b3898da2e6f9036de0c5c13dccf4a8ca45f7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 Mar 2013 08:52:53 +0100 Subject: demux_lavf: use avg_frame_rate instead of r_frame_rate r_frame_rate was deprecated and was finally removed from Libav and FFmpeg git. Not sure what's the correct replacement. avg_frame_rate may or may not be worse than the fallback of using the time_base as guess. The framerate is mostly unused, but needed for frame-based subtitles and for encoding. (It appears encoding guesses a timebase based on the FPS, and I'm not sure why we don't just use the source timebase.) --- demux/demux_lavf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'demux') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 843bd171e4..ba34e7acfa 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -369,8 +369,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) * heuristic makes up works with subtitles in practice. */ double fps; - if (st->r_frame_rate.num) - fps = av_q2d(st->r_frame_rate); + 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) * -- cgit v1.2.3