[FFmpeg-cvslog] avcodec/mpegvideo: Clear thread_context array before allocating
Michael Niedermayer
git at videolan.org
Sat Jun 6 22:59:24 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun 6 21:25:04 2015 +0200| [7ddedd23625adeb2926b76df84987d658cc876c8] | committer: Michael Niedermayer
avcodec/mpegvideo: Clear thread_context array before allocating
This is probably redundant but its safer
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7ddedd23625adeb2926b76df84987d658cc876c8
---
libavcodec/mpegvideo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 6b54631..839dc23 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1283,6 +1283,7 @@ av_cold int ff_mpv_common_init(MpegEncContext *s)
s->parse_context.state = -1;
s->context_initialized = 1;
+ memset(s->thread_context, 0, sizeof(s->thread_context));
s->thread_context[0] = s;
// if (s->width && s->height) {
@@ -1409,6 +1410,7 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s)
if ((err = init_context_frame(s)))
goto fail;
+ memset(s->thread_context, 0, sizeof(s->thread_context));
s->thread_context[0] = s;
if (s->width && s->height) {
More information about the ffmpeg-cvslog
mailing list