diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-09-11 10:23:03 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-09-11 11:12:35 +0000 |
commit | 9e505485f33503168c476465396843f0894001f0 (patch) | |
tree | a2cfe78801ffb5ab9e4c28be24579b93d1b2c0de | |
parent | 848ad8db2208cccfd671f1362a0b2c7a91ee1541 (diff) | |
download | ffmpeg-9e505485f33503168c476465396843f0894001f0.tar.gz |
avformat/smacker: check avformat_new_stream() return value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavformat/smacker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c index b4c1bf4335..b0ccd5387a 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -180,6 +180,8 @@ static int smacker_read_header(AVFormatContext *s) smk->indexes[i] = -1; if (smk->rates[i]) { ast[i] = avformat_new_stream(s, NULL); + if (!ast[i]) + return AVERROR(ENOMEM); smk->indexes[i] = ast[i]->index; ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO; if (smk->aflags[i] & SMK_AUD_BINKAUD) { |