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:
reimar 2010-08-29 06:51:05 +00:00 committed by Uoti Urpala
parent 415b948f2e
commit dec2db6326
1 changed files with 4 additions and 1 deletions

View File

@ -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;