Mercurial > libavcodec.hg
comparison ac3dec.c @ 7831:8195c970d077 libavcodec
Rename error_resilience to error_recognition.
author | michael |
---|---|
date | Mon, 08 Sep 2008 18:18:49 +0000 |
parents | e5f7a43f63ae |
children | 4cd689b64c36 |
comparison
equal
deleted
inserted
replaced
7830:3da762190370 | 7831:8195c970d077 |
---|---|
214 avctx->channels = avctx->request_channels; | 214 avctx->channels = avctx->request_channels; |
215 } | 215 } |
216 s->downmixed = 1; | 216 s->downmixed = 1; |
217 | 217 |
218 /* allocate context input buffer */ | 218 /* allocate context input buffer */ |
219 if (avctx->error_resilience >= FF_ER_CAREFUL) { | 219 if (avctx->error_recognition >= FF_ER_CAREFUL) { |
220 s->input_buffer = av_mallocz(AC3_FRAME_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); | 220 s->input_buffer = av_mallocz(AC3_FRAME_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); |
221 if (!s->input_buffer) | 221 if (!s->input_buffer) |
222 return AVERROR_NOMEM; | 222 return AVERROR_NOMEM; |
223 } | 223 } |
224 | 224 |
1184 av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); | 1184 av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); |
1185 err = AC3_PARSE_ERROR_FRAME_SIZE; | 1185 err = AC3_PARSE_ERROR_FRAME_SIZE; |
1186 } | 1186 } |
1187 | 1187 |
1188 /* check for crc mismatch */ | 1188 /* check for crc mismatch */ |
1189 if(err != AC3_PARSE_ERROR_FRAME_SIZE && avctx->error_resilience >= FF_ER_CAREFUL) { | 1189 if(err != AC3_PARSE_ERROR_FRAME_SIZE && avctx->error_recognition >= FF_ER_CAREFUL) { |
1190 if(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, &buf[2], s->frame_size-2)) { | 1190 if(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, &buf[2], s->frame_size-2)) { |
1191 av_log(avctx, AV_LOG_ERROR, "frame CRC mismatch\n"); | 1191 av_log(avctx, AV_LOG_ERROR, "frame CRC mismatch\n"); |
1192 err = AC3_PARSE_ERROR_CRC; | 1192 err = AC3_PARSE_ERROR_CRC; |
1193 } | 1193 } |
1194 } | 1194 } |