Skip to content
Snippets Groups Projects
Commit 8a26ae5f authored by Luca Barbato's avatar Luca Barbato
Browse files

mpjpeg: Check stream allocation

Bug-Id: CID 1308152
parent b08569a2
No related branches found
No related tags found
No related merge requests found
...@@ -123,6 +123,8 @@ static int mpjpeg_read_header(AVFormatContext *s) ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment