Browse Source

mpjpeg: Check stream allocation

Bug-Id: CID 1308152
tags/n2.8
Luca Barbato 10 years ago
parent
commit
8a26ae5f94
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/mpjpegdec.c

+ 2
- 0
libavformat/mpjpegdec.c View File

@@ -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;


Loading…
Cancel
Save