summaryrefslogtreecommitdiff
path: root/libavcodec/vp56.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/vp56.c')
-rw-r--r--libavcodec/vp56.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 6779ffb6dc..5bd0a1abef 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -514,8 +514,14 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
s->modelp = &s->models[is_alpha];
res = s->parse_header(s, buf, remaining_buf_size, &golden_frame);
- if (res < 0)
+ if (res < 0) {
+ int i;
+ for (i = 0; i < 4; i++) {
+ if (s->frames[i].data[0])
+ avctx->release_buffer(avctx, &s->frames[i]);
+ }
return res;
+ }
if (res == VP56_SIZE_CHANGE) {
int i;