git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f30a7d9
)
avcodec/mpegvideo: Clear thread_context array before allocating
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 6 Jun 2015 19:25:04 +0000
(21:25 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 6 Jun 2015 20:47:50 +0000
(22:47 +0200)
This is probably redundant but its safer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegvideo.c
patch
|
blob
|
history
diff --git
a/libavcodec/mpegvideo.c
b/libavcodec/mpegvideo.c
index
6b54631
..
839dc23
100644
(file)
--- 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) {