[FFmpeg-cvslog] vp9: fix memory corruption if header decoding fails after size change.
Ronald S. Bultje
git at videolan.org
Sat Jan 25 01:51:13 CET 2014
ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Fri Jan 24 19:21:57 2014 -0500| [4147b337c10588b36a537c15c4b0b2b432fcc3ea] | committer: Ronald S. Bultje
vp9: fix memory corruption if header decoding fails after size change.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4147b337c10588b36a537c15c4b0b2b432fcc3ea
---
libavcodec/vp9.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index ec6ceb0..2965394 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);
}
More information about the ffmpeg-cvslog
mailing list