path: root/audio
diff options
authorwm4 <wm4@nowhere>2013-06-04 00:29:29 +0200
committerwm4 <wm4@nowhere>2013-06-04 00:29:44 +0200
commit92ae48db0f91fbfcfbb1722fa81c922808f62d5a (patch)
treee32fe21b5f8c11ada7788768a76e2d9f7d061c66 /audio
parentdaf8ed831b4ae63cf0931cc3d6727956137f865f (diff)
parentc1ac97b99b3e80bbf84ed540178dd6689ead0b87 (diff)
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 'audio')
1 files changed, 2 insertions, 5 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c
index 8abc0a6035..b5a4ee1ef8 100644
--- a/audio/decode/ad_lavc.c
+++ b/audio/decode/ad_lavc.c
@@ -402,13 +402,10 @@ static int decode_new_packet(struct sh_audio *sh)
AVPacket pkt;
- av_init_packet(&pkt);
+ mp_set_av_packet(&pkt, mpkt); = start;
pkt.size = insize;
- if (mpkt && mpkt->avpacket) {
- pkt.side_data = mpkt->avpacket->side_data;
- pkt.side_data_elems = mpkt->avpacket->side_data_elems;
- }
if (pts != MP_NOPTS_VALUE && !packet_already_used) {
sh->pts = pts;
sh->pts_bytes = 0;