From e8bd16a5e1d0df6cfe5900621a453a74c6540f46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= <Reimar.Doeffinger@gmx.de>
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 ff74d05025e..25989773a11 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');
-- 
GitLab