Commit b0ccebe4 authored by Michael Niedermayer's avatar Michael Niedermayer

mpeg12dec: correct AV_EF flags.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7fbe87c0
...@@ -1364,7 +1364,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, ...@@ -1364,7 +1364,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx,
if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) { if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
s->full_pel[0] = get_bits1(&s->gb); s->full_pel[0] = get_bits1(&s->gb);
f_code = get_bits(&s->gb, 3); f_code = get_bits(&s->gb, 3);
if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM)) if (f_code == 0 && (avctx->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT)))
return -1; return -1;
s->mpeg_f_code[0][0] = f_code; s->mpeg_f_code[0][0] = f_code;
s->mpeg_f_code[0][1] = f_code; s->mpeg_f_code[0][1] = f_code;
...@@ -1372,7 +1372,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, ...@@ -1372,7 +1372,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx,
if (s->pict_type == AV_PICTURE_TYPE_B) { if (s->pict_type == AV_PICTURE_TYPE_B) {
s->full_pel[1] = get_bits1(&s->gb); s->full_pel[1] = get_bits1(&s->gb);
f_code = get_bits(&s->gb, 3); f_code = get_bits(&s->gb, 3);
if (f_code == 0 && (avctx->err_recognition & AV_EF_BITSTREAM)) if (f_code == 0 && (avctx->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT)))
return -1; return -1;
s->mpeg_f_code[1][0] = f_code; s->mpeg_f_code[1][0] = f_code;
s->mpeg_f_code[1][1] = f_code; s->mpeg_f_code[1][1] = f_code;
...@@ -1804,7 +1804,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, ...@@ -1804,7 +1804,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
&& s->progressive_frame == 0 /* vbv_delay == 0xBBB || 0xE10*/; && s->progressive_frame == 0 /* vbv_delay == 0xBBB || 0xE10*/;
if (left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) if (left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10)
|| ((avctx->err_recognition & AV_EF_BUFFER) && left > 8)) { || ((avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_AGGRESSIVE)) && left > 8)) {
av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n", left, show_bits(&s->gb, FFMIN(left, 23))); av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n", left, show_bits(&s->gb, FFMIN(left, 23)));
return -1; return -1;
} else } else
...@@ -1984,7 +1984,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, ...@@ -1984,7 +1984,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
s->aspect_ratio_info = get_bits(&s->gb, 4); s->aspect_ratio_info = get_bits(&s->gb, 4);
if (s->aspect_ratio_info == 0) { if (s->aspect_ratio_info == 0) {
av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n"); av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n");
if (avctx->err_recognition & AV_EF_BITSTREAM) if (avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_COMPLIANT))
return -1; return -1;
} }
s->frame_rate_index = get_bits(&s->gb, 4); s->frame_rate_index = get_bits(&s->gb, 4);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment