[MPlayer-cvslog] r32035 - in branches/1.0rc4: . libmpdemux/demux_lavf.c

siretart subversion at mplayerhq.hu
Mon Aug 30 22:07:34 CEST 2010


Author: siretart
Date: Mon Aug 30 22:07:34 2010
New Revision: 32035

Log:
Always use convergence_duration for subtitles otherwise
they will stay on screen forever for ASS subtitles in mkv
if no ASS renderer is used.

backport r32032 by reimar

Modified:
   branches/1.0rc4/   (props changed)
   branches/1.0rc4/libmpdemux/demux_lavf.c

Modified: branches/1.0rc4/libmpdemux/demux_lavf.c
==============================================================================
--- branches/1.0rc4/libmpdemux/demux_lavf.c	Mon Aug 30 18:48:52 2010	(r32034)
+++ branches/1.0rc4/libmpdemux/demux_lavf.c	Mon Aug 30 22:07:34 2010	(r32035)
@@ -634,7 +634,10 @@ static int demux_lavf_fill_buffer(demuxe
     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.flags & PKT_FLAG_KEY && pkt.convergence_duration > 0)
+        // always set endpts for subtitles, even if PKT_FLAG_KEY is not set,
+        // otherwise they will stay on screen to long if e.g. ASS is demuxed from mkv
+        if((ds == demux->sub || (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;


More information about the MPlayer-cvslog mailing list