Mercurial > libavformat.hg
changeset 5147:64ad0b0e120d libavformat
check av_new_stream return value, patch by Kent Mein, mein at cs dot umn dot edu
author | bcoudurier |
---|---|
date | Tue, 25 Aug 2009 19:58:21 +0000 |
parents | b0706c2efb78 |
children | 74d599c373f9 |
files | r3d.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/r3d.c Tue Aug 25 09:46:16 2009 +0000 +++ b/r3d.c Tue Aug 25 19:58:21 2009 +0000 @@ -87,6 +87,8 @@ dprintf(s, "audio channels %d\n", tmp); if (tmp > 0) { AVStream *ast = av_new_stream(s, 1); + if (!ast) + return AVERROR(ENOMEM); ast->codec->codec_type = CODEC_TYPE_AUDIO; ast->codec->codec_id = CODEC_ID_PCM_S32BE; ast->codec->channels = tmp;