Commit d85b3c4f authored by Michael Niedermayer's avatar Michael Niedermayer

vp56dec: avoid freeing the returned frame before returning it.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 25715064
...@@ -621,7 +621,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size, ...@@ -621,7 +621,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
next: next:
if (p->key_frame || golden_frame) { if (p->key_frame || golden_frame) {
if (s->framep[VP56_FRAME_GOLDEN]->data[0] && if (s->framep[VP56_FRAME_GOLDEN]->data[0] && s->framep[VP56_FRAME_GOLDEN] != p &&
s->framep[VP56_FRAME_GOLDEN] != s->framep[VP56_FRAME_GOLDEN2]) s->framep[VP56_FRAME_GOLDEN] != s->framep[VP56_FRAME_GOLDEN2])
avctx->release_buffer(avctx, s->framep[VP56_FRAME_GOLDEN]); avctx->release_buffer(avctx, s->framep[VP56_FRAME_GOLDEN]);
s->framep[VP56_FRAME_GOLDEN] = p; s->framep[VP56_FRAME_GOLDEN] = p;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment