summaryrefslogtreecommitdiffstats
path: root/libavcodec/vp56.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-09 16:58:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-09 17:03:47 +0100
commit9195377bc5818b65b34556938749d97eecde413b (patch)
treef78c66df441121c7a47378aeae9c18a7e5402f64 /libavcodec/vp56.c
parent7ec1fe1f472c2fb1cf0e0b2b89e107a08ac7efe5 (diff)
downloadffmpeg-streaming-9195377bc5818b65b34556938749d97eecde413b.zip
ffmpeg-streaming-9195377bc5818b65b34556938749d97eecde413b.tar.gz
vp56dec: Fix handling of alpha configuration changes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp56.c')
-rw-r--r--libavcodec/vp56.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 1e373aa..3002fc1 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -552,7 +552,16 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
res = s->alpha_context->parse_header(s->alpha_context, buf, remaining_buf_size);
if (res != 1) {
- avctx->release_buffer(avctx, p);
+ if(res==2) {
+ av_log(avctx, AV_LOG_ERROR, "Alpha reconfiguration\n");
+ for (i = 0; i < 4; i++) {
+ if (s->frames[i].data[0])
+ avctx->release_buffer(avctx, &s->frames[i]);
+ av_assert0(!s->alpha_context->frames[i].data[0]);
+ }
+ vp56_size_changed(s);
+ }else
+ avctx->release_buffer(avctx, p);
return -1;
}
}
OpenPOWER on IntegriCloud