1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

Make sure avcodec_alloc_frame() returns valid.

This commit is contained in:
Themaister 2012-11-24 00:51:48 +01:00
parent 6dad2cda8c
commit 4becd4e315

View File

@ -764,6 +764,8 @@ static bool encode_audio(ffemu_t *handle, AVPacket *pkt, bool dry)
#ifdef HAVE_FFMPEG_AVCODEC_ENCODE_AUDIO2
AVFrame *frame = avcodec_alloc_frame();
if (!frame)
return false;
frame->nb_samples = handle->audio.frames_in_buffer;
frame->pts = handle->audio.frame_cnt;