aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-26 21:54:36 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-26 21:54:36 +0100
commit46c48d546ddf5125fcfae63f94c1e635e3a75f18 (patch)
tree5cbe1f71c8265c1aa26d47af49be5d0f983c753f
parent7b3ca7ae8b514bca290f97e996c5f189e60a7a74 (diff)
downloadffmpeg-46c48d546ddf5125fcfae63f94c1e635e3a75f18.tar.gz
mpegvideo: fix null pointer dereference on switching streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 2e37ef1c1b..f4739c43d5 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -695,6 +695,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
s->input_picture_number = s1->input_picture_number;
av_assert0(!s->picture || s->picture != s1->picture);
+ if(s->picture)
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
ff_mpeg_unref_picture(s, &s->picture[i]);
if (s1->picture[i].f.data[0] &&