avcodec/wavpack: check for allocation failure

This commit is contained in:
Paul B Mahol 2020-03-11 21:53:27 +01:00
parent 2c08cd284d
commit b3c46e26aa

View File

@ -987,6 +987,9 @@ static int init_thread_copy(AVCodecContext *avctx)
s->curr_frame.f = av_frame_alloc();
s->prev_frame.f = av_frame_alloc();
if (!s->curr_frame.f || !s->prev_frame.f)
return AVERROR(ENOMEM);
return 0;
}