Commit 4147b337 authored by Ronald S. Bultje's avatar Ronald S. Bultje

vp9: fix memory corruption if header decoding fails after size change.

parent c9e6325e
...@@ -3772,7 +3772,8 @@ static int vp9_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo ...@@ -3772,7 +3772,8 @@ static int vp9_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo
VP9Context *s = dst->priv_data, *ssrc = src->priv_data; VP9Context *s = dst->priv_data, *ssrc = src->priv_data;
// detect size changes in other threads // 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); free_buffers(s);
} }
......
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