summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-11 19:20:41 +0200
committerwm4 <wm4@nowhere>2013-07-11 19:20:41 +0200
commit6f6632b8dd9273a3cbc8e3e0d69e1d3dceed6f45 (patch)
tree3b7f34069b768850a3f9cdb3a81895c3f5385b31 /demux/demux.h
parent06281848de53153266d8d4639bbc98e12505994b (diff)
downloadmpv-6f6632b8dd9273a3cbc8e3e0d69e1d3dceed6f45.tar.bz2
mpv-6f6632b8dd9273a3cbc8e3e0d69e1d3dceed6f45.tar.xz
ad_lavc: re-unsimplify, fix libavcodec API usage
It turns out that some code that was removed earlier was still needed. avcodec_decode_audio4() can decode packets "partially". In that case, you have to "slice" the packet and call the decode function again. Codecs which need this are obscure and in low numbers. One sample that needs it is here: rsync://fate-suite.ffmpeg.org/fate-suite/lossless-audio/luckynight-partial.shn (This one decodes in rather small increments.) The new code is much simpler than what has been removed earlier, though. The fact that we own the packet returned by the demuxer helps a lot. Not sure what should happen if avcodec_decode_audio4() returns 0. Currently, we throw away the packet in this case. We don't want to be stuck in an endless loop (could happen if the decoder produces no output either).
Diffstat (limited to 'demux/demux.h')
0 files changed, 0 insertions, 0 deletions