diff options
author | wm4 <wm4@nowhere> | 2015-09-29 18:43:28 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-29 18:43:28 +0200 |
commit | b4491c00c4b514e925b6bbf501e26de801f28a39 (patch) | |
tree | 9659ab40a27704295ed377f14e2d904df47f70d9 /demux | |
parent | 12cd48a8a9be94612a6645f27fc971d0aac985ff (diff) |
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.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_lavf.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |