[FFmpeg-cvslog] avcodec/mpegvideo: Don't initialize error resilience context for encoder
Andreas Rheinhardt
git at videolan.org
Tue Jan 4 18:21:17 EET 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Dec 23 22:29:03 2021 +0100| [5de7bce12e9469911a743cb3dcfb86776ccbf57c] | committer: Andreas Rheinhardt
avcodec/mpegvideo: Don't initialize error resilience context for encoder
It is only used for decoders.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5de7bce12e9469911a743cb3dcfb86776ccbf57c
---
libavcodec/mpegvideo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index f2618f5b7b..129e0ef647 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)
More information about the ffmpeg-cvslog
mailing list