[x264-devel] lavf input: don't use deprecated AVStream fields
Tim Walker
git at videolan.org
Tue Apr 23 23:03:04 CEST 2013
x264 | branch: master | Tim Walker <tdskywalker at gmail.com> | Tue Mar 19 23:42:43 2013 +0100| [68ee80a51f6f1de78877a9907e3efcbb1fe13ac6] | committer: Jason Garrett-Glaser
lavf input: don't use deprecated AVStream fields
Fixes building against newer libavcodecs from the Libav project.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=68ee80a51f6f1de78877a9907e3efcbb1fe13ac6
---
input/lavf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/input/lavf.c b/input/lavf.c
index e36632d..c4289c8 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 */
More information about the x264-devel
mailing list