mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-25 12:19:52 +00:00
bfi: check return value of av_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
b791a0831b
commit
51f1bf3309
@ -81,6 +81,8 @@ static int bfi_read_header(AVFormatContext * s)
|
||||
/*Load the palette to extradata */
|
||||
avio_skip(pb, 8);
|
||||
vstream->codec->extradata = av_malloc(768);
|
||||
if (!vstream->codec->extradata)
|
||||
return AVERROR(ENOMEM);
|
||||
vstream->codec->extradata_size = 768;
|
||||
avio_read(pb, vstream->codec->extradata,
|
||||
vstream->codec->extradata_size);
|
||||
|
Loading…
Reference in New Issue
Block a user