aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-05-31 15:31:57 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-05-31 15:31:57 +0000
commitfbe52e41884bb43e279de453b8052f681a6ccd51 (patch)
treec66b7e8e877dfca8383ef416be41585faadfa7d1
parentc78c6d6c588c1db60cf2a1bd5bc65095852f91fc (diff)
downloadffmpeg-fbe52e41884bb43e279de453b8052f681a6ccd51.tar.gz
use enum value for CRC error
Originally committed as revision 13580 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ac3_parser.h1
-rw-r--r--libavcodec/ac3dec.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/ac3_parser.h b/libavcodec/ac3_parser.h
index 63bea56512..1af7fa1407 100644
--- a/libavcodec/ac3_parser.h
+++ b/libavcodec/ac3_parser.h
@@ -32,6 +32,7 @@ typedef enum {
AC3_PARSE_ERROR_SAMPLE_RATE = -3,
AC3_PARSE_ERROR_FRAME_SIZE = -4,
AC3_PARSE_ERROR_FRAME_TYPE = -5,
+ AC3_PARSE_ERROR_CRC = -6,
} AC3ParseError;
/**
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 0829784f27..42903cbc10 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1157,12 +1157,12 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
if(err != AC3_PARSE_ERROR_FRAME_SIZE && avctx->error_resilience >= FF_ER_CAREFUL) {
if(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, &buf[2], s->frame_size-2)) {
av_log(avctx, AV_LOG_ERROR, "frame CRC mismatch\n");
- err = 1;
+ err = AC3_PARSE_ERROR_CRC;
}
}
/* parse the syncinfo */
- if(err && err != 1) {
+ if(err && err != AC3_PARSE_ERROR_CRC) {
switch(err) {
case AC3_PARSE_ERROR_SYNC:
av_log(avctx, AV_LOG_ERROR, "frame sync error\n");