changeset 31576:d918dc8c833c

stricter check for convergence_duration validity, avoid using meaningless values
author aurel
date Tue, 06 Jul 2010 09:02:37 +0000
parents c90f270458ae
children 639f8db9fece
files libmpdemux/demux_lavf.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Mon Jul 05 21:34:51 2010 +0000
+++ b/libmpdemux/demux_lavf.c	Tue Jul 06 09:02:37 2010 +0000
@@ -634,7 +634,7 @@
     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.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->pos=demux->filepos;