mirror of
https://github.com/mpv-player/mpv
synced 2024-10-02 16:25:33 +02:00
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
This commit is contained in:
parent
415b948f2e
commit
dec2db6326
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user