From e8bd16a5e1d0df6cfe5900621a453a74c6540f46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Thu, 29 May 2008 15:59:14 +0000 Subject: [PATCH] Check av_new_stream return value, fixes CID75 RUN2 Originally committed as revision 13536 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/daud.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/daud.c b/libavformat/daud.c index ff74d05..2598977 100644 --- a/libavformat/daud.c +++ b/libavformat/daud.c @@ -22,6 +22,8 @@ static int daud_header(AVFormatContext *s, AVFormatParameters *ap) { AVStream *st = av_new_stream(s, 0); + if (!st) + return AVERROR(ENOMEM); st->codec->codec_type = CODEC_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_PCM_S24DAUD; st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd'); -- 2.7.4