Commit 46c48d54 authored by Michael Niedermayer's avatar Michael Niedermayer

mpegvideo: fix null pointer dereference on switching streams

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7b3ca7ae
...@@ -695,6 +695,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, ...@@ -695,6 +695,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
s->input_picture_number = s1->input_picture_number; s->input_picture_number = s1->input_picture_number;
av_assert0(!s->picture || s->picture != s1->picture); av_assert0(!s->picture || s->picture != s1->picture);
if(s->picture)
for (i = 0; i < MAX_PICTURE_COUNT; i++) { for (i = 0; i < MAX_PICTURE_COUNT; i++) {
ff_mpeg_unref_picture(s, &s->picture[i]); ff_mpeg_unref_picture(s, &s->picture[i]);
if (s1->picture[i].f.data[0] && if (s1->picture[i].f.data[0] &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment