Originally committed as revision 13534 to svn://svn.ffmpeg.org/ffmpeg/trunk
if (v_packs) {
ctx->v_id = stream_nr++;
vst = av_new_stream(s, ctx->v_id);
+ if (!vst)
+ return AVERROR(ENOMEM);
vst->codec->codec_type = CODEC_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_NUV;
vst->codec->width = width;
if (a_packs) {
ctx->a_id = stream_nr++;
ast = av_new_stream(s, ctx->a_id);
+ if (!ast)
+ return AVERROR(ENOMEM);
ast->codec->codec_type = CODEC_TYPE_AUDIO;
ast->codec->codec_id = CODEC_ID_PCM_S16LE;
ast->codec->channels = 2;