diff --git a/libavcodec/mpeg_er.c b/libavcodec/mpeg_er.c index 6ac3e7b3e7..951167a478 100644 --- a/libavcodec/mpeg_er.c +++ b/libavcodec/mpeg_er.c @@ -76,7 +76,7 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, s->mcsel = 0; memcpy(s->mv, mv, sizeof(*mv)); - // The following disables the IDCT. + // The following disables unquantizing and the IDCT. for (size_t i = 0; i < FF_ARRAY_ELEMS(s->block_last_index); i++) s->block_last_index[i] = -1; @@ -93,7 +93,7 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, if (ref) av_log(s->avctx, AV_LOG_DEBUG, "Interlaced error concealment is not fully implemented\n"); - ff_mpv_reconstruct_mb(s, s->block); + ff_mpv_reconstruct_mb(s, NULL); } av_cold int ff_mpeg_er_init(MpegEncContext *s) diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index 903d435e8c..928464d6c1 100644 --- a/libavcodec/mpegvideo_dec.c +++ b/libavcodec/mpegvideo_dec.c @@ -1066,6 +1066,9 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], static av_cold void debug_dct_coeffs(MPVContext *s, const int16_t block[][64]) { + if (!block) // happens when called via error resilience + return; + void *const logctx = s->avctx; const uint8_t *const idct_permutation = s->idsp.idct_permutation;