aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-23 01:49:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-23 05:13:56 +0200
commitf97faf67510d92c2a18180a6ec80435d5dd1da0b (patch)
treeb63cb9b8a5fc5bafa6963c07c712dbbdf419a175 /libavcodec/mpegaudiodec.c
parent9e8dff90efa3faae5ac07fa5fae7e154367e24fd (diff)
parente71ebb19722bd2b46831d0ec311b757a56340617 (diff)
downloadffmpeg-f97faf67510d92c2a18180a6ec80435d5dd1da0b.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: id3v2: fix doxy comment - 'machine byte order' makes no sense on char arrays VC1: restore mistakenly removed code twinvq: check output buffer size before decoding twinvq: return an error when the packet size is too small lavf: export some forgotten symbols with non-av prefixes. swscale: update altivec yuv2planeX asm to new per-plane API. swscale: make yuv2yuvX_10_sse2/avx 8/9/16-bits aware. yuv2planeX10 SIMD swscale: decide whether to use yuv2plane1/X on a per-plane basis. swscale: reintroduce full precision in 16-bit output. Split up yuv2yuvX functions Split out yuv2yuv1 luma and chroma in order to make them generic DSP functions lavc: replace references to deprecated AVCodecContext.error_recognition to use AVCodecContext.err_recognition lavc: translate non-flag-based er options into flag-based ef options at codec open add -err_filter AVOptions to access flag-based error recognition h264_weight: initialize "height" function argument properly. presets: spelling error in libvpx 1080p50_60 avplay: fix fullscreen behaviour with SDL 1.2.14 on Mac OS X Conflicts: ffplay.c libavformat/libavformat.v libswscale/swscale.c libswscale/x86/swscale_template.c tests/ref/lavfi/pixfmts_scale Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index f5f169a8e3..286e08f27a 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -79,7 +79,7 @@ typedef struct MPADecodeContext {
#endif
int adu_mode; ///< 0 for standard mp3, 1 for adu formatted mp3
int dither_state;
- int error_recognition;
+ int err_recognition;
AVCodecContext* avctx;
MPADSPContext mpadsp;
} MPADecodeContext;
@@ -280,7 +280,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
ff_mpadsp_init(&s->mpadsp);
avctx->sample_fmt= OUT_FMT;
- s->error_recognition= avctx->error_recognition;
+ s->err_recognition = avctx->err_recognition;
if (!init && !avctx->parse_only) {
int offset;
@@ -1104,7 +1104,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
s_index -= 4;
skip_bits_long(&s->gb, last_pos - pos);
av_log(s->avctx, AV_LOG_INFO, "overread, skip %d enddists: %d %d\n", last_pos - pos, end_pos-pos, end_pos2-pos);
- if(s->error_recognition >= FF_ER_COMPLIANT)
+ if(s->err_recognition & AV_EF_BITSTREAM)
s_index=0;
break;
}
@@ -1134,10 +1134,10 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
/* skip extension bits */
bits_left = end_pos2 - get_bits_count(&s->gb);
//av_log(NULL, AV_LOG_ERROR, "left:%d buf:%p\n", bits_left, s->in_gb.buffer);
- if (bits_left < 0 && s->error_recognition >= FF_ER_COMPLIANT) {
+ if (bits_left < 0 && (s->err_recognition & AV_EF_BITSTREAM)) {
av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left);
s_index=0;
- }else if(bits_left > 0 && s->error_recognition >= FF_ER_AGGRESSIVE){
+ }else if(bits_left > 0 && (s->err_recognition & AV_EF_BUFFER)){
av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left);
s_index=0;
}