summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-08-29 06:51:05 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:15:49 +0200
commitdec2db63261480933a17cdd8ffa4ec782e583a89 (patch)
treebf356853b4066cc446547a07d4defaffdf5a5ffe
parent415b948f2ea25cb4526fc57cfd822c015f8c8a57 (diff)
downloadmpv-dec2db63261480933a17cdd8ffa4ec782e583a89.tar.bz2
mpv-dec2db63261480933a17cdd8ffa4ec782e583a89.tar.xz
demux_lavf: Always use convergence_duration for subtitles
Otherwise subtitles will stay on screen forever for ASS subtitles in mkv if no ASS renderer is used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32032 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/demux_lavf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index 136e2a8ef6..af77d6aef3 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -647,7 +647,10 @@ static int demux_lavf_fill_buffer(demuxer_t *demux, demux_stream_t *dsds){
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;