mirror of
https://github.com/libretro/RetroArch
synced 2025-01-01 12:11:47 +00:00
Make sure avcodec_alloc_frame() returns valid.
This commit is contained in:
parent
6dad2cda8c
commit
4becd4e315
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user