1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-21 22:30:22 +00:00
mpv/audio/decode
wm4 6f6632b8dd 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).
2013-07-11 19:20:41 +02:00
..
ad_internal.h audio/decode: remove vararg from ad_control() 2013-04-12 20:35:59 +02:00
ad_lavc.c ad_lavc: re-unsimplify, fix libavcodec API usage 2013-07-11 19:20:41 +02:00
ad_mpg123.c demux: remove facility for partial packet reads 2013-07-11 19:10:33 +02:00
ad_spdif.c ad_spdif: better PTS sync 2013-07-11 19:14:30 +02:00
ad.c core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
ad.h demux: remove facility for partial packet reads 2013-07-11 19:10:33 +02:00
dec_audio.c mplayer: fix incorrect audio sync after format changes 2013-07-11 19:15:09 +02:00
dec_audio.h core: make options.c compile standalone 2013-06-08 17:08:20 +02:00