Fix incorrect error checking

This commit is contained in:
LJ Sonic 2023-11-01 10:45:44 +01:00
parent 54258ee3ad
commit c62fd57328

View file

@ -381,12 +381,11 @@ static void InitialiseAudioBuffer(movie_t *movie)
{
movieaudioframe_t *frame = EnqueueBuffer(&stream->framepool);
av_samples_alloc(
if (!av_samples_alloc(
frame->samples, NULL,
movie->frame->channels, movie->frame->nb_samples,
AV_SAMPLE_FMT_S16, 1
);
if (!frame->samples)
))
I_Error("FFmpeg: cannot allocate samples");
}
}