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 /video | |
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 'video')
-rw-r--r-- | video/decode/vd_lavc.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index fff44edaed..540204bcfd 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -673,17 +673,8 @@ static int decode(struct sh_video *sh, struct demux_packet *packet, else avctx->skip_frame = ctx->skip_frame; - av_init_packet(&pkt); - pkt.data = packet ? packet->buffer : NULL; - pkt.size = packet ? packet->len : 0; - /* Some codecs (ZeroCodec, some cases of PNG) may want keyframe info - * from demuxer. */ - if (packet && packet->keyframe) - pkt.flags |= AV_PKT_FLAG_KEY; - if (packet && packet->avpacket) { - pkt.side_data = packet->avpacket->side_data; - pkt.side_data_elems = packet->avpacket->side_data_elems; - } + mp_set_av_packet(&pkt, packet); + // The avcodec opaque field stupidly supports only int64_t type union pts { int64_t i; double d; }; avctx->reordered_opaque = (union pts){.d = *reordered_pts}.i; |