diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 21e53465de..06370ebdc9 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -595,8 +595,8 @@ static int demux_lavf_fill_buffer(demuxer_t *demux, demux_stream_t *dsds){ if(pkt.pts != AV_NOPTS_VALUE){ dp->pts=pkt.pts * av_q2d(priv->avfc->streams[id]->time_base); priv->last_pts= dp->pts * AV_TIME_BASE; - if(pkt.duration) - dp->endpts = dp->pts + pkt.duration * av_q2d(priv->avfc->streams[id]->time_base); + if(pkt.convergence_duration) + dp->endpts = dp->pts + pkt.convergence_duration * av_q2d(priv->avfc->streams[id]->time_base); } dp->pos=demux->filepos; dp->flags= !!(pkt.flags&PKT_FLAG_KEY);