mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
This commit is contained in:
parent
7305d97f04
commit
b01c7b756e
@ -87,6 +87,8 @@ static int r3d_read_red1(AVFormatContext *s)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user