From: Andreas Rheinhardt <andreas.rheinha...@outlook.com> Given that the MPEG-1/2 decoders unquantize the blocks on their own, block_last_index is only used to signal to ff_mpv_reconstruct_mb() whether a block is skipped or not; but this is only checked for inter macroblocks, so it is unnecessary to set block_last_index for intra macroblocks.
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- libavcodec/mpeg12.c | 4 ++-- libavcodec/mpeg12dec.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 3056c53c7c..62a77b6806 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -276,7 +276,7 @@ end: } if (i > MAX_INDEX) - i = AVERROR_INVALIDDATA; + return AVERROR_INVALIDDATA; - return i; + return 0; } diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 9cf1bb9b28..5d2719d0f0 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -377,7 +377,6 @@ static inline int mpeg2_decode_block_intra(MpegEncContext *s, check_scantable_index(s, i); - s->block_last_index[n] = i; return 0; } @@ -518,8 +517,6 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) s->mb_x, s->mb_y); return ret; } - - s->block_last_index[i] = ret; } } } else { -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".