Problem found using ASAN.
In some case, the ff_mov_get_channel_layout_tag function will not find 0
as termination for lookup in the array mov_ch_layouts_wav.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
If regularly parsing new chan atoms (as in rtpdec_qt), but the
chan atoms don't actually contain any channel layout, don't reset
the value that the caller has filled in (by guessing).
Signed-off-by: Martin Storsjö <martin@martin.st>
This fixes crashes when called from rtpdec_qt, where
AVFormatContext->pb is null, a crash present since 3bab7cd128.
Signed-off-by: Martin Storsjö <martin@martin.st>
This implements reading the tag in the demuxer and adds support for writing it
in the muxer. Some example channel layout tables for muxing are included for
ac3, aac, and alac, but they are not utilized yet.