From e74287e93b0ee7afb384624f60dc440b736fec6b Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Tue, 19 Mar 2013 23:42:43 +0100 Subject: [PATCH] lavf input: don't use deprecated AVStream fields Fixes building against newer libavcodecs from the Libav project. --- input/lavf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input/lavf.c b/input/lavf.c index e36632df..c4289c8d 100644 --- a/input/lavf.c +++ b/input/lavf.c @@ -183,8 +183,8 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c h->stream_id = i; h->next_frame = 0; AVCodecContext *c = h->lavf->streams[i]->codec; - info->fps_num = h->lavf->streams[i]->r_frame_rate.num; - info->fps_den = h->lavf->streams[i]->r_frame_rate.den; + info->fps_num = h->lavf->streams[i]->avg_frame_rate.num; + info->fps_den = h->lavf->streams[i]->avg_frame_rate.den; info->timebase_num = h->lavf->streams[i]->time_base.num; info->timebase_den = h->lavf->streams[i]->time_base.den; /* lavf is thread unsafe as calling av_read_frame invalidates previously read AVPackets */ -- 2.40.0