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:
2762323
)
avcodec/mpegvideo: check that the context is initialized in ff_mpv_common_frame_size_...
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 7 Sep 2014 11:00:47 +0000
(13:00 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 7 Sep 2014 11:26:22 +0000
(13:26 +0200)
The function otherwise would initialize the context without setting context_initialized
alternatively we could set context_initialized
Fixes valgrind anomalies related to ticket 3928
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
7ae4e35
..
613a92e
100644
(file)
--- a/
libavcodec/mpegvideo.c
+++ b/
libavcodec/mpegvideo.c
@@
-1456,6
+1456,9
@@
int ff_mpv_common_frame_size_change(MpegEncContext *s)
{
int i, err = 0;
+ if (!s->context_initialized)
+ return AVERROR(EINVAL);
+
if (s->slice_context_count > 1) {
for (i = 0; i < s->slice_context_count; i++) {
free_duplicate_context(s->thread_context[i]);