mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
4a7429203a
commit
a25d912dca
|
@ -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…
Reference in New Issue