diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 827800f85a0df55d8194df2809f2d10364901738..0a030542f2de80c86e0eaf6037a1fab51a36f461 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -340,7 +340,7 @@ static int decode_slice(MpegEncContext *s) /* buggy padding but the frame should still end approximately at * the bitstream end */ if ((s->workaround_bugs & FF_BUG_NO_PADDING) && - (s->err_recognition & AV_EF_BUFFER)) + (s->avctx->err_recognition & AV_EF_BUFFER)) max_extra += 48; else if ((s->workaround_bugs & FF_BUG_NO_PADDING)) max_extra += 256 * 256 * 256 * 64; diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index e9e4a3555c6a7b0fd6012ef9916cd5ab108b6c60..a89e5d0a373a550d5ff9fc03f48e2d97dda25e43 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -481,7 +481,7 @@ static int h263_decode_block(MpegEncContext * s, int16_t * block, level = get_bits(&s->gb, 8); if((level&0x7F) == 0){ av_log(s->avctx, AV_LOG_ERROR, "illegal dc %d at %d %d\n", level, s->mb_x, s->mb_y); - if(s->err_recognition & AV_EF_BITSTREAM) + if (s->avctx->err_recognition & AV_EF_BITSTREAM) return -1; } if (level == 255) diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h index 22d6d59d49d34fe4261c38fd5a5af68fc49897b5..252029cd3a98677865a44c52c28c9c63c8e16075 100644 --- a/libavcodec/mpeg4video.h +++ b/libavcodec/mpeg4video.h @@ -223,7 +223,7 @@ static inline int ff_mpeg4_pred_dc(MpegEncContext *s, int n, int level, } else { level += pred; ret = level; - if (s->err_recognition & AV_EF_BITSTREAM) { + if (s->avctx->err_recognition & AV_EF_BITSTREAM) { if (level < 0) { av_log(s->avctx, AV_LOG_ERROR, "dc<0 at %dx%d\n", s->mb_x, s->mb_y); diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index ec03aac8f34ea4ca48ef7b6901bc5ee14104b698..8dbdbf9b131b8f064c2b8f5bfbfea57a040661f4 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -563,7 +563,7 @@ static inline int mpeg4_decode_dc(MpegEncContext *s, int n, int *dir_ptr) if (code > 8) { if (get_bits1(&s->gb) == 0) { /* marker */ - if (s->err_recognition & AV_EF_BITSTREAM) { + if (s->avctx->err_recognition & AV_EF_BITSTREAM) { av_log(s->avctx, AV_LOG_ERROR, "dc marker bit missing\n"); return -1; } @@ -1099,7 +1099,7 @@ static inline int mpeg4_decode_block(Mpeg4DecContext *ctx, int16_t *block, level = level * qmul - qadd; if ((unsigned)(level + 2048) > 4095) { - if (s->err_recognition & AV_EF_BITSTREAM) { + if (s->avctx->err_recognition & AV_EF_BITSTREAM) { if (level > 2560 || level < -2560) { av_log(s->avctx, AV_LOG_ERROR, "|level| overflow in 3. esc, qp=%d\n", diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index bce307c72ca4758db85c0b7a853a461cbb21d5f9..8311b13c0820b721722e840e1ef5f778638bafcf 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1858,8 +1858,6 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) } } - s->err_recognition = avctx->err_recognition; - /* set dequantizer, we can't do it during init as * it might change for mpeg4 and we can't do it in the header * decode as init is not called for mpeg4 there yet */ diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 35c75e4955a5c0501393ce507e7a284a9f5799bf..4247d9949f62542646744047d89978d9a9391735 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -474,7 +474,6 @@ typedef struct MpegEncContext { GetBitContext last_resync_gb; ///< used to search for the next resync marker int mb_num_left; ///< number of MBs left in this video packet (for partitioned Slices only) int next_p_frame_damaged; ///< set if the next p frame is damaged, to avoid showing trashed b frames - int err_recognition; ParseContext parse_context; diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 402fbe36cbbb975726675e70e707edca5b4751bf..ea770f9d5cee5684dfa8ee7ab56ab8a1d1206b8f 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -833,7 +833,9 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, int16_t * block, i-= 192; if(i&(~63)){ const int left= get_bits_left(&s->gb); - if(((i+192 == 64 && level/qmul==-1) || !(s->err_recognition&AV_EF_BITSTREAM)) && left>=0){ + if (((i + 192 == 64 && level / qmul == -1) || + !(s->avctx->err_recognition & AV_EF_BITSTREAM)) && + left >= 0) { av_log(s->avctx, AV_LOG_ERROR, "ignoring overflow at %d %d\n", s->mb_x, s->mb_y); break; }else{