Commit 8a26ae5f authored by Luca Barbato's avatar Luca Barbato

mpjpeg: Check stream allocation

Bug-Id: CID 1308152
parent b08569a2
......@@ -123,6 +123,8 @@ static int mpjpeg_read_header(AVFormatContext *s)
return AVERROR_INVALIDDATA;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = AV_CODEC_ID_MJPEG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment