vlc/vlc-3.0 | branch: master | Francois Cartegnie <[email protected]> | Thu Jun 14 18:43:47 2018 +0200| [db79bc4c741c6a8e053285a7de73ed523c99444f] | committer: Francois Cartegnie
demux: avformat: fix build with guess_rate / libav (cherry picked from commit 2fb02b9461e8e1b875dad74bae2e28c7e63a09f3) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=db79bc4c741c6a8e053285a7de73ed523c99444f --- modules/demux/avformat/demux.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index 91991f442b..867b4fe037 100644 --- a/modules/demux/avformat/demux.c +++ b/modules/demux/avformat/demux.c @@ -444,7 +444,19 @@ int avformat_OpenDemux( vlc_object_t *p_this ) # warning FIXME: implement palette transmission psz_type = "video"; - AVRational rate = av_guess_frame_rate( p_sys->ic, s, NULL ); + AVRational rate; +#if (LIBAVUTIL_VERSION_MICRO < 100) /* libav */ +# if (LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(55, 20, 0)) + rate.num = s->time_base.num; + rate.den = s->time_base.den; +# else + rate.num = s->codec->time_base.num; + rate.den = s->codec->time_base.den; +# endif + rate.den *= __MAX( s->codec->ticks_per_frame, 1 ); +#else /* ffmpeg */ + rate = av_guess_frame_rate( p_sys->ic, s, NULL ); +#endif if( rate.den && rate.num ) { es_fmt.video.i_frame_rate = rate.num; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
