diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2014-01-24 19:21:57 -0500 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2014-01-24 19:25:26 -0500 |
commit | 4147b337c10588b36a537c15c4b0b2b432fcc3ea (patch) | |
tree | 3ff57bec1ced6bd06caea5af205ae5cd3498aa3e /libavcodec | |
parent | c9e6325ed9844070dca03ac1c5fec946533cb315 (diff) | |
download | ffmpeg-4147b337c10588b36a537c15c4b0b2b432fcc3ea.tar.gz |
vp9: fix memory corruption if header decoding fails after size change.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vp9.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index ec6ceb010d..29653949d5 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -3772,7 +3772,8 @@ static int vp9_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo VP9Context *s = dst->priv_data, *ssrc = src->priv_data; // detect size changes in other threads - if (s->above_partition_ctx && (s->cols != ssrc->cols || s->rows != ssrc->rows)) { + if (s->above_partition_ctx && + (!ssrc->above_partition_ctx || s->cols != ssrc->cols || s->rows != ssrc->rows)) { free_buffers(s); } |