Commit a25d912d authored by Rafaël Carré's avatar Rafaël Carré Committed by Anton Khirnov

avcodec_encode_audio(): fix invalid free

Since 2bc0de38, AVFrame needs to be initialized
before calling avcodec_get_frame_defaults().
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 4a742920
...@@ -1073,7 +1073,7 @@ int attribute_align_arg avcodec_encode_audio(AVCodecContext *avctx, ...@@ -1073,7 +1073,7 @@ int attribute_align_arg avcodec_encode_audio(AVCodecContext *avctx,
const short *samples) const short *samples)
{ {
AVPacket pkt; AVPacket pkt;
AVFrame frame0; AVFrame frame0 = { 0 };
AVFrame *frame; AVFrame *frame;
int ret, samples_size, got_packet; int ret, samples_size, got_packet;
......
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