diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-06 21:25:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-06 22:47:50 +0200 |
commit | 7ddedd23625adeb2926b76df84987d658cc876c8 (patch) | |
tree | 613acc86cded1b54fdfd49fa7860e536716efb28 | |
parent | f30a7d9861af884f352ec2484820a75d79a4e0e2 (diff) | |
download | ffmpeg-7ddedd23625adeb2926b76df84987d658cc876c8.tar.gz |
avcodec/mpegvideo: Clear thread_context array before allocating
This is probably redundant but its safer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 6b5463198e..839dc23b7d 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) { |