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>
pull/6/merge
Rafaël Carré 13 years ago committed by Anton Khirnov
parent 4a7429203a
commit a25d912dca
  1. 2
      libavcodec/utils.c

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

Loading…
Cancel
Save