mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +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
|
#ifdef HAVE_FFMPEG_AVCODEC_ENCODE_AUDIO2
|
||||||
AVFrame *frame = avcodec_alloc_frame();
|
AVFrame *frame = avcodec_alloc_frame();
|
||||||
|
if (!frame)
|
||||||
|
return false;
|
||||||
|
|
||||||
frame->nb_samples = handle->audio.frames_in_buffer;
|
frame->nb_samples = handle->audio.frames_in_buffer;
|
||||||
frame->pts = handle->audio.frame_cnt;
|
frame->pts = handle->audio.frame_cnt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user