diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-16 20:51:48 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-18 14:58:09 +0200 |
commit | 8e7dae173d07533e1de46fad7bb2f834febe27cf (patch) | |
tree | 1e16938db643ba43a83d55524626812957c75e0a /libmpdemux/demux_lavf.c | |
parent | e990fb2ffeaa786339895c8f3b3f104ef536bf39 (diff) | |
download | mpv-8e7dae173d07533e1de46fad7bb2f834febe27cf.tar.bz2 mpv-8e7dae173d07533e1de46fad7bb2f834febe27cf.tar.xz |
subtitles/demux: store duration instead of endpts in demux packets
Diffstat (limited to 'libmpdemux/demux_lavf.c')
-rw-r--r-- | libmpdemux/demux_lavf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 96f83407b0..03ffa17c43 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -756,11 +756,11 @@ static int demux_lavf_fill_buffer(demuxer_t *demux, demux_stream_t *dsds){ if(ts != AV_NOPTS_VALUE){ dp->pts = ts * av_q2d(priv->avfc->streams[id]->time_base); priv->last_pts= dp->pts * AV_TIME_BASE; - // always set endpts for subtitles, even if PKT_FLAG_KEY is not set, + // always set duration 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->duration = pkt.convergence_duration * av_q2d(priv->avfc->streams[id]->time_base); } dp->pos=demux->filepos; dp->flags= !!(pkt.flags&PKT_FLAG_KEY); |