mirror of
https://github.com/mpv-player/mpv
synced 2024-12-21 22:30:22 +00:00
6f6632b8dd
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). |
||
---|---|---|
.. | ||
ad_internal.h | ||
ad_lavc.c | ||
ad_mpg123.c | ||
ad_spdif.c | ||
ad.c | ||
ad.h | ||
dec_audio.c | ||
dec_audio.h |