Commit 2fb02b94 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: avformat: fix build with guess_rate / libav

parent a66d0633
......@@ -437,7 +437,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment