mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-20 22:41:11 +00:00
mpjpeg: Check stream allocation
Bug-Id: CID 1308152
This commit is contained in:
parent
b08569a239
commit
8a26ae5f94
@ -123,6 +123,8 @@ static int mpjpeg_read_header(AVFormatContext *s)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
st = avformat_new_stream(s, NULL);
|
st = avformat_new_stream(s, NULL);
|
||||||
|
if (!st)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||||
st->codec->codec_id = AV_CODEC_ID_MJPEG;
|
st->codec->codec_id = AV_CODEC_ID_MJPEG;
|
||||||
|
Loading…
Reference in New Issue
Block a user