Mercurial > mplayer.hg
changeset 31950:77b4e83fe42d
Always use convergence_duration for subtitles otherwise
they will stay on screen forever for ASS subtitles in mkv
if no ASS renderer is used.
author | reimar |
---|---|
date | Sun, 29 Aug 2010 06:51:05 +0000 |
parents | fc0217dee42c |
children | 256b6b7d5e96 |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;