mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
vp9: fix memory corruption if header decoding fails after size change.
This commit is contained in:
parent
c9e6325ed9
commit
4147b337c1
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user