mpv/audio/decode
wm4 01869d1391 demux_lavf, ad_lavc, vd_lavc: pass codec header data directly
Instead of putting codec header data into WAVEFORMATEX and
BITMAPINFOHEADER, pass it directly via AVCodecContext. To do this, we
add mp_copy_lav_codec_headers(), which copies the codec header data
from one AVCodecContext to another (originally, the plan was to use
avcodec_copy_context() for this, but it looks like this would turn
decoder initialization into an even worse mess).

Get rid of the silly CodecID <-> codec_tag mapping. This was originally
needed for codecs.conf: codec tags were used to identify codecs, but
libavformat didn't always return useful codec tags (different file
formats can have different, overlapping tag numbers). Since we don't
go through WAVEFORMATEX etc. and pass all header data directly via
AVCodecContext, we can be absolutely sure that the codec tag mapping is
not needed anymore.

Note that this also destroys the "standard" MPlayer method of exporting
codec header data. WAVEFORMATEX and BITMAPINFOHEADER made sure that
other non-libavcodec decoders could be initialized. However, all these
decoders have been removed, so this is just cruft full of old hacks that
are not needed anymore. There's still ad_spdif and ad_mpg123, bu neither
of these need codec header data. Should we ever add non-libavcodec
decoders, better data structures without the past hacks could be added
to export the headers.
2013-02-10 17:25:57 +01:00
..
ad.c core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
ad.h core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
ad_internal.h core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
ad_lavc.c demux_lavf, ad_lavc, vd_lavc: pass codec header data directly 2013-02-10 17:25:57 +01:00
ad_mpg123.c core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
ad_spdif.c core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
dec_audio.c core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
dec_audio.h core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00