[FFmpeg-cvslog] avformat/smacker: check avformat_new_stream() return value
Paul B Mahol
git at videolan.org
Wed Sep 11 13:13:42 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Sep 11 10:23:03 2013 +0000| [9e505485f33503168c476465396843f0894001f0] | committer: Paul B Mahol
avformat/smacker: check avformat_new_stream() return value
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e505485f33503168c476465396843f0894001f0
---
libavformat/smacker.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index b4c1bf4..b0ccd53 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) {
More information about the ffmpeg-cvslog
mailing list