Mercurial > mplayer.hg
comparison libmpdemux/demux_lavf.c @ 31576:d918dc8c833c
stricter check for convergence_duration validity, avoid using meaningless values
author | aurel |
---|---|
date | Tue, 06 Jul 2010 09:02:37 +0000 |
parents | 7ae298e3ba15 |
children | e8bb6ecadfbc |
comparison
equal
deleted
inserted
replaced
31575:c90f270458ae | 31576:d918dc8c833c |
---|---|
632 } | 632 } |
633 | 633 |
634 if(pkt.pts != AV_NOPTS_VALUE){ | 634 if(pkt.pts != AV_NOPTS_VALUE){ |
635 dp->pts=pkt.pts * av_q2d(priv->avfc->streams[id]->time_base); | 635 dp->pts=pkt.pts * av_q2d(priv->avfc->streams[id]->time_base); |
636 priv->last_pts= dp->pts * AV_TIME_BASE; | 636 priv->last_pts= dp->pts * AV_TIME_BASE; |
637 if(pkt.convergence_duration) | 637 if(pkt.flags & PKT_FLAG_KEY && pkt.convergence_duration > 0) |
638 dp->endpts = dp->pts + pkt.convergence_duration * av_q2d(priv->avfc->streams[id]->time_base); | 638 dp->endpts = dp->pts + pkt.convergence_duration * av_q2d(priv->avfc->streams[id]->time_base); |
639 } | 639 } |
640 dp->pos=demux->filepos; | 640 dp->pos=demux->filepos; |
641 dp->flags= !!(pkt.flags&PKT_FLAG_KEY); | 641 dp->flags= !!(pkt.flags&PKT_FLAG_KEY); |
642 // append packet to DS stream: | 642 // append packet to DS stream: |