mirror of https://github.com/mpv-player/mpv
demux_lavf: stricter check for convergence_duration validity
Avoid using meaningless values git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31642 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4662ea6409
commit
d7a9c6d240
|
@ -638,7 +638,7 @@ static int demux_lavf_fill_buffer(demuxer_t *demux, demux_stream_t *dsds){
|
||||||
if(pkt.pts != AV_NOPTS_VALUE){
|
if(pkt.pts != AV_NOPTS_VALUE){
|
||||||
dp->pts=pkt.pts * av_q2d(priv->avfc->streams[id]->time_base);
|
dp->pts=pkt.pts * av_q2d(priv->avfc->streams[id]->time_base);
|
||||||
priv->last_pts= dp->pts * AV_TIME_BASE;
|
priv->last_pts= dp->pts * AV_TIME_BASE;
|
||||||
if(pkt.convergence_duration)
|
if(pkt.flags & PKT_FLAG_KEY && pkt.convergence_duration > 0)
|
||||||
dp->endpts = dp->pts + pkt.convergence_duration * av_q2d(priv->avfc->streams[id]->time_base);
|
dp->endpts = dp->pts + pkt.convergence_duration * av_q2d(priv->avfc->streams[id]->time_base);
|
||||||
}
|
}
|
||||||
dp->pos=demux->filepos;
|
dp->pos=demux->filepos;
|
||||||
|
|
Loading…
Reference in New Issue