From 9abc98737fe12ee67ddb7d52e9d497d4de2bac6c Mon Sep 17 00:00:00 2001 From: Dustin Brody Date: Sat, 22 Oct 2011 08:44:16 -0400 Subject: lavc: replace references to deprecated AVCodecContext.error_recognition to use AVCodecContext.err_recognition Signed-off-by: Anton Khirnov --- libavcodec/mpeg12.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'libavcodec/mpeg12.c') diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index b7b8abd285..cdccefbd7e 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1342,7 +1342,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) { s->full_pel[0] = get_bits1(&s->gb); f_code = get_bits(&s->gb, 3); - if (f_code == 0 && avctx->error_recognition >= FF_ER_COMPLIANT) + if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM)) return -1; s->mpeg_f_code[0][0] = f_code; s->mpeg_f_code[0][1] = f_code; @@ -1350,7 +1350,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, if (s->pict_type == AV_PICTURE_TYPE_B) { s->full_pel[1] = get_bits1(&s->gb); f_code = get_bits(&s->gb, 3); - if (f_code == 0 && avctx->error_recognition >= FF_ER_COMPLIANT) + if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM)) return -1; s->mpeg_f_code[1][0] = f_code; s->mpeg_f_code[1][1] = f_code; @@ -1784,7 +1784,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, && s->progressive_frame == 0 /* vbv_delay == 0xBBB || 0xE10*/; if (left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) - || (avctx->error_recognition >= FF_ER_AGGRESSIVE && left > 8)) { + || ((avctx->err_recognition & AV_EF_BUFFER) && left > 8)) { av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n", left, show_bits(&s->gb, FFMIN(left, 23))); return -1; } else @@ -1876,7 +1876,7 @@ static int slice_decode_thread(AVCodecContext *c, void *arg) //av_log(c, AV_LOG_DEBUG, "ret:%d resync:%d/%d mb:%d/%d ts:%d/%d ec:%d\n", //ret, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, s->start_mb_y, s->end_mb_y, s->error_count); if (ret < 0) { - if (c->error_recognition >= FF_ER_EXPLODE) + if (c->err_recognition & AV_EF_EXPLODE) return ret; if (s->resync_mb_x >= 0 && s->resync_mb_y >= 0) ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, AC_ERROR | DC_ERROR | MV_ERROR); @@ -1964,7 +1964,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, s->aspect_ratio_info = get_bits(&s->gb, 4); if (s->aspect_ratio_info == 0) { av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n"); - if (avctx->error_recognition >= FF_ER_COMPLIANT) + if (avctx->err_recognition & AV_EF_BITSTREAM) return -1; } s->frame_rate_index = get_bits(&s->gb, 4); @@ -2238,7 +2238,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, if (avctx->extradata && !avctx->frame_number) { int ret = decode_chunks(avctx, picture, data_size, avctx->extradata, avctx->extradata_size); - if (ret < 0 && avctx->error_recognition >= FF_ER_EXPLODE) + if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE)) return ret; } @@ -2296,7 +2296,7 @@ static int decode_chunks(AVCodecContext *avctx, s->sync=1; } else { av_log(avctx, AV_LOG_ERROR, "ignoring SEQ_START_CODE after %X\n", last_code); - if (avctx->error_recognition >= FF_ER_EXPLODE) + if (avctx->err_recognition & AV_EF_EXPLODE) return AVERROR_INVALIDDATA; } break; @@ -2326,7 +2326,7 @@ static int decode_chunks(AVCodecContext *avctx, last_code = PICTURE_START_CODE; } else { av_log(avctx, AV_LOG_ERROR, "ignoring pic after %X\n", last_code); - if (avctx->error_recognition >= FF_ER_EXPLODE) + if (avctx->err_recognition & AV_EF_EXPLODE) return AVERROR_INVALIDDATA; } break; @@ -2339,7 +2339,7 @@ static int decode_chunks(AVCodecContext *avctx, mpeg_decode_sequence_extension(s); } else { av_log(avctx, AV_LOG_ERROR, "ignoring seq ext after %X\n", last_code); - if (avctx->error_recognition >= FF_ER_EXPLODE) + if (avctx->err_recognition & AV_EF_EXPLODE) return AVERROR_INVALIDDATA; } break; @@ -2357,7 +2357,7 @@ static int decode_chunks(AVCodecContext *avctx, mpeg_decode_picture_coding_extension(s); } else { av_log(avctx, AV_LOG_ERROR, "ignoring pic cod ext after %X\n", last_code); - if (avctx->error_recognition >= FF_ER_EXPLODE) + if (avctx->err_recognition & AV_EF_EXPLODE) return AVERROR_INVALIDDATA; } break; @@ -2373,7 +2373,7 @@ static int decode_chunks(AVCodecContext *avctx, s->sync=1; } else { av_log(avctx, AV_LOG_ERROR, "ignoring GOP_START_CODE after %X\n", last_code); - if (avctx->error_recognition >= FF_ER_EXPLODE) + if (avctx->err_recognition & AV_EF_EXPLODE) return AVERROR_INVALIDDATA; } break; @@ -2420,7 +2420,7 @@ static int decode_chunks(AVCodecContext *avctx, if (!s2->pict_type) { av_log(avctx, AV_LOG_ERROR, "Missing picture start code\n"); - if (avctx->error_recognition >= FF_ER_EXPLODE) + if (avctx->err_recognition & AV_EF_EXPLODE) return AVERROR_INVALIDDATA; break; } @@ -2460,7 +2460,7 @@ static int decode_chunks(AVCodecContext *avctx, emms_c(); if (ret < 0) { - if (avctx->error_recognition >= FF_ER_EXPLODE) + if (avctx->err_recognition & AV_EF_EXPLODE) return ret; if (s2->resync_mb_x >= 0 && s2->resync_mb_y >= 0) ff_er_add_slice(s2, s2->resync_mb_x, s2->resync_mb_y, s2->mb_x, s2->mb_y, AC_ERROR | DC_ERROR | MV_ERROR); -- cgit v1.2.3