[FFmpeg-devel] [PATCH] Allow autodetecting PS and SBR for AAC without extradata.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue Aug 9 19:57:54 CEST 2011
This was possible before and was broken when this code was added.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
libavcodec/aacdec.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 7589bd7..5d061f4 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -578,6 +578,10 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
int sr, i;
enum ChannelPosition new_che_pos[4][MAX_ELEM_ID];
+ // Allow these to be detected later
+ ac->m4ac.sbr = -1;
+ ac->m4ac.ps = -1;
+
sr = sample_rate_idx(avctx->sample_rate);
ac->m4ac.sampling_index = sr;
ac->m4ac.channels = avctx->channels;
@@ -594,7 +598,7 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
if (set_default_channel_config(avctx, new_che_pos, ac->m4ac.chan_config) < 0 &&
avctx->error_recognition >= FF_ER_EXPLODE)
return AVERROR_INVALIDDATA;
- output_configure(ac, ac->che_pos, new_che_pos, ac->m4ac.chan_config, OC_GLOBAL_HDR);
+ output_configure(ac, ac->che_pos, new_che_pos, ac->m4ac.chan_config, OC_NONE);
}
}
--
1.7.5.4
More information about the ffmpeg-devel
mailing list