From: Reimar Döffinger Date: Thu, 29 May 2008 15:59:14 +0000 (+0000) Subject: Check av_new_stream return value, fixes CID75 RUN2 X-Git-Tag: v0.5~4395 X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/e8bd16a5e1d0df6cfe5900621a453a74c6540f46 Check av_new_stream return value, fixes CID75 RUN2 Originally committed as revision 13536 to svn://svn.ffmpeg.org/ffmpeg/trunk --- 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');