Commit 9e505485 authored by Paul B Mahol's avatar Paul B Mahol

avformat/smacker: check avformat_new_stream() return value

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 848ad8db
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment