Browse Source

Release old pictures after a resolution change in vp5/6 decoder

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Laurent Aimar Michael Niedermayer 14 years ago
parent
commit
dba20b8478
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      libavcodec/vp56.c

+ 10
- 0
libavcodec/vp56.c View File

@@ -515,6 +515,16 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (!res)
return -1;

if (res == 2) {
int i;
for (i = 0; i < 4; i++) {
if (s->frames[i].data[0])
avctx->release_buffer(avctx, &s->frames[i]);
}
if (is_alpha)
return -1;
}

if (!is_alpha) {
p->reference = 1;
if (avctx->get_buffer(avctx, p) < 0) {


Loading…
Cancel
Save