aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-28 13:41:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-28 13:41:44 +0200
commita57ee6cca10d7329a2ce425db1b0a2f49e0971af (patch)
tree2667f2171b594b206c2b97a27f71b41004d24cd6
parent30b8f3e7dcd0318b91e205dcbf774ef92fb6193c (diff)
parent8a26ae5f94e613dbf7eb8e3c60462e966e409cdc (diff)
downloadffmpeg-a57ee6cca10d7329a2ce425db1b0a2f49e0971af.tar.gz
Merge commit '8a26ae5f94e613dbf7eb8e3c60462e966e409cdc'
* commit '8a26ae5f94e613dbf7eb8e3c60462e966e409cdc': mpjpeg: Check stream allocation Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mpjpegdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index 845e95cb74..b8281fc2c1 100644
--- a/libavformat/mpjpegdec.c
+++ b/libavformat/mpjpegdec.c
@@ -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;