Skip to content
Snippets Groups Projects
Commit b01c7b75 authored by Kent Mein's avatar Kent Mein Committed by Baptiste Coudurier
Browse files

check av_new_stream return value, patch by Kent Mein, mein at cs dot umn dot edu

Originally committed as revision 19701 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 7305d97f
No related branches found
No related tags found
No related merge requests found
...@@ -87,6 +87,8 @@ static int r3d_read_red1(AVFormatContext *s) ...@@ -87,6 +87,8 @@ static int r3d_read_red1(AVFormatContext *s)
dprintf(s, "audio channels %d\n", tmp); dprintf(s, "audio channels %d\n", tmp);
if (tmp > 0) { if (tmp > 0) {
AVStream *ast = av_new_stream(s, 1); AVStream *ast = av_new_stream(s, 1);
if (!ast)
return AVERROR(ENOMEM);
ast->codec->codec_type = CODEC_TYPE_AUDIO; ast->codec->codec_type = CODEC_TYPE_AUDIO;
ast->codec->codec_id = CODEC_ID_PCM_S32BE; ast->codec->codec_id = CODEC_ID_PCM_S32BE;
ast->codec->channels = tmp; ast->codec->channels = tmp;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment