From b4491c00c4b514e925b6bbf501e26de801f28a39 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Sep 2015 18:43:28 +0200 Subject: Take care of libavcodec convergence_duration deprecation This AVPacket field was a hack against the fact that the duration field was merely an int (too small for things like subtitle durations). Newer libavcodec drops this field and makes duration 64 bit. --- demux/demux_lavf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'demux') diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 8978ebf69e..f73c8693ba 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -882,8 +882,10 @@ static int demux_lavf_fill_buffer(demuxer_t *demux) if (pkt->dts != AV_NOPTS_VALUE) dp->dts = pkt->dts * av_q2d(st->time_base); dp->duration = pkt->duration * av_q2d(st->time_base); +#if !HAVE_AV_AVPACKET_INT64_DURATION if (pkt->convergence_duration > 0) dp->duration = pkt->convergence_duration * av_q2d(st->time_base); +#endif dp->pos = pkt->pos; dp->keyframe = pkt->flags & AV_PKT_FLAG_KEY; if (dp->pts != MP_NOPTS_VALUE) { -- cgit v1.2.3