avcodec_encode_audio(): fix invalid free

Since 2bc0de385, AVFrame needs to be initialized
before calling avcodec_get_frame_defaults().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Rafaël Carré 2012-10-15 18:41:55 +02:00 committed by Anton Khirnov
parent 4a7429203a
commit a25d912dca
1 changed files with 1 additions and 1 deletions

View File

@ -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;