[FFmpeg-trac] #513(avcodec:open): FFMpeg is unable to find the aac codec parameters for mp4 file
FFmpeg
trac at avcodec.org
Sun Apr 8 00:11:56 CEST 2012
#513: FFMpeg is unable to find the aac codec parameters for mp4 file
--------------------------------------+-----------------------------------
Reporter: workcutter@… | Owner:
Type: defect | Status: open
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: aac mov | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
--------------------------------------+-----------------------------------
Comment (by reimar):
How was that file created? It is clearly invalid, it claims the audio is
coded as two channels, but there is only one (+ parametric stereo, so it
looks like two, but still only one is encoded).
The below patch proves that by fixing playback (but of course will break
any non-mono AAC file)
{{{
--- a/libavcodec/mpeg4audio.c
+++ b/libavcodec/mpeg4audio.c
@@ -89,6 +89,7 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c,
const uint8_t *buf,
c->object_type = get_object_type(&gb);
c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
c->chan_config = get_bits(&gb, 4);
+c->chan_config = 1;
if (c->chan_config < FF_ARRAY_ELEMS(ff_mpeg4audio_channels))
c->channels = ff_mpeg4audio_channels[c->chan_config];
c->sbr = -1;
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/513#comment:6>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list