aboutsummaryrefslogtreecommitdiff
path: root/libavformat/smacker.c
diff options
context:
space:
mode:
authorPaul B Mahol2013-09-11 10:23:03 +0000
committerPaul B Mahol2013-09-11 11:12:35 +0000
commit9e505485f33503168c476465396843f0894001f0 (patch)
treea2cfe78801ffb5ab9e4c28be24579b93d1b2c0de /libavformat/smacker.c
parent848ad8db2208cccfd671f1362a0b2c7a91ee1541 (diff)
avformat/smacker: check avformat_new_stream() return value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/smacker.c')
-rw-r--r--libavformat/smacker.c2
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) {