diff options
author | wm4 <wm4@nowhere> | 2013-06-04 00:29:29 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-04 00:29:44 +0200 |
commit | 92ae48db0f91fbfcfbb1722fa81c922808f62d5a (patch) | |
tree | e32fe21b5f8c11ada7788768a76e2d9f7d061c66 /demux/demux_lavf.c | |
parent | daf8ed831b4ae63cf0931cc3d6727956137f865f (diff) | |
parent | c1ac97b99b3e80bbf84ed540178dd6689ead0b87 (diff) | |
download | mpv-92ae48db0f91fbfcfbb1722fa81c922808f62d5a.tar.bz2 mpv-92ae48db0f91fbfcfbb1722fa81c922808f62d5a.tar.xz |
Merge branch 'sub_mess'
This branch heavily refactors the subtitle code (both loading and
rendering), and adds support for a few new formats through FFmpeg.
We don't remove any of the old code yet. There are still some subtleties
related to subreader.c to be resolved: code page detection & conversion,
timing post-processing, UTF-16 subtitle support, support for the -subfps
option. Also, SRT reading and loading ASS via libass should be turned
into proper demuxers. (SRT is needed because Libav's is gravely broken,
and we want ASS loading via libass to cover full libass format support.
Both should be demuxers which are probed _before_ libavformat, so that
all subtitles can be loaded through the demuxer infrastructure, and
libavformat subtitles don't need to be treated in a special way.)
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r-- | demux/demux_lavf.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index a978bc9cee..a482f736c6 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -671,11 +671,8 @@ static int demux_lavf_fill_buffer(demuxer_t *demux, demux_stream_t *dsds) if (ts != AV_NOPTS_VALUE) { dp->pts = ts * av_q2d(st->time_base); priv->last_pts = dp->pts * AV_TIME_BASE; - // always set duration for subtitles, even if AV_PKT_FLAG_KEY isn't set, - // otherwise they will stay on screen to long if e.g. ASS is demuxed - // from mkv - if ((stream->type == STREAM_SUB || (pkt->flags & AV_PKT_FLAG_KEY)) && - pkt->convergence_duration > 0) + dp->duration = pkt->duration * av_q2d(st->time_base); + if (pkt->convergence_duration > 0) dp->duration = pkt->convergence_duration * av_q2d(st->time_base); } dp->pos = demux->filepos; |