# HG changeset patch # User reimar # Date 1283064665 0 # Node ID 77b4e83fe42dd8903b8a1822ff54edb24ffe5044 # Parent fc0217dee42c42458937d1dc0d28613b57a29413 Always use convergence_duration for subtitles otherwise they will stay on screen forever for ASS subtitles in mkv if no ASS renderer is used. diff -r fc0217dee42c -r 77b4e83fe42d libmpdemux/demux_lavf.c --- a/libmpdemux/demux_lavf.c Sun Aug 29 06:46:06 2010 +0000 +++ b/libmpdemux/demux_lavf.c Sun Aug 29 06:51:05 2010 +0000 @@ -628,7 +628,10 @@ 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;