diff options
author | Diego Biurrun <diego@biurrun.de> | 2009-07-23 02:33:25 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2009-07-23 02:33:25 +0000 |
commit | d15153244fb04a9546f4a5312a38b1ec8f6c5654 (patch) | |
tree | 5c05419f50ee7880e21701d9967468a747e96356 /libavcodec/ac3dec.c | |
parent | 89547cfb3657c540c4e6ac662a736dd79235e2ae (diff) | |
download | ffmpeg-d15153244fb04a9546f4a5312a38b1ec8f6c5654.tar.gz |
refactoring: properly separate AC-3 and E-AC-3 code
Originally committed as revision 19501 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r-- | libavcodec/ac3dec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 79bfd24771..90ffd74ba5 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -314,9 +314,12 @@ static int parse_frame_header(AC3DecodeContext *s) s->skip_syntax = 1; memset(s->channel_uses_aht, 0, sizeof(s->channel_uses_aht)); return ac3_parse_header(s); - } else { + } else if (CONFIG_EAC3_DECODER) { s->eac3 = 1; return ff_eac3_parse_header(s); + } else { + av_log(s->avctx, AV_LOG_ERROR, "E-AC-3 support not compiled in\n"); + return -1; } } @@ -559,7 +562,7 @@ static void decode_transform_coeffs_ch(AC3DecodeContext *s, int blk, int ch, /* if AHT is used, mantissas for all blocks are encoded in the first block of the frame. */ int bin; - if (!blk) + if (!blk && CONFIG_EAC3_DECODER) ff_eac3_decode_transform_coeffs_aht_ch(s, ch); for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) { s->fixed_coeffs[ch][bin] = s->pre_mantissa[ch][bin][blk] >> s->dexps[ch][bin]; |