Commit e55e8b2c authored by Luca Barbato's avatar Luca Barbato

lavc: do not leak frames in avcodec_decode_audio4

Notwithstanding the return value the frame should be freed if
is not going to be used.
Reported-by: 's avatarMatthew Wolenetz <wolenetz@chromium.org>
parent e0c53c34
......@@ -1463,9 +1463,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
frame->extended_buf = NULL;
frame->nb_extended_buf = 0;
}
}
if (ret < 0 && frame->data[0])
} else if (frame->data[0])
av_frame_unref(frame);
}
......
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