]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mpjpegdec.c
Merge commit 'a31c4b2cbef9aee15910fc3df52519aef46760de'
[ffmpeg] / libavformat / mpjpegdec.c
index 845e95cb744fb85201fb71a05b96847717f21cb0..b8281fc2c18bc0ef19ebe3dec31178a2b09b52ba 100644 (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;