[FFmpeg-devel] [PATCH 31/36] avcodec/mpegvideo: Don't initialize error resilience context for encoder
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Fri Dec 24 05:23:27 EET 2021
It is only used for decoders.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/mpegvideo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 8b16b4ec0b..c0ba91e864 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -835,7 +835,7 @@ static int init_context_frame(MpegEncContext *s)
return AVERROR(ENOMEM);
memset(s->mbintra_table, 1, mb_array_size);
- return ff_mpeg_er_init(s);
+ return s->encoding ? 0 : ff_mpeg_er_init(s);
}
static void clear_context(MpegEncContext *s)
--
2.32.0
More information about the ffmpeg-devel
mailing list