Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/vp56.c')
-rw-r--r--libavcodec/vp56.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 5b787b6135..7503876d2d 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -511,10 +511,16 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
s->modelp = &s->models[is_alpha];
res = s->parse_header(s, buf, remaining_buf_size, &golden_frame);
- if (!res)
- return -1;
+ 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 == 2) {
+ if (res == VP56_SIZE_CHANGE) {
int i;
for (i = 0; i < 4; i++) {
if (s->frames[i].data[0])
@@ -533,7 +539,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return -1;
}
- if (res == 2)
+ if (res == VP56_SIZE_CHANGE)
if (vp56_size_changed(avctx)) {
avctx->release_buffer(avctx, p);
return -1;