Commit 7c7dd9d6 authored by reimar's avatar reimar

Check av_new_stream return value, fixes CID79 RUN2


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13534 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9d2dd3ae
...@@ -149,6 +149,8 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { ...@@ -149,6 +149,8 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
if (v_packs) { if (v_packs) {
ctx->v_id = stream_nr++; ctx->v_id = stream_nr++;
vst = av_new_stream(s, ctx->v_id); vst = av_new_stream(s, ctx->v_id);
if (!vst)
return AVERROR(ENOMEM);
vst->codec->codec_type = CODEC_TYPE_VIDEO; vst->codec->codec_type = CODEC_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_NUV; vst->codec->codec_id = CODEC_ID_NUV;
vst->codec->width = width; vst->codec->width = width;
...@@ -163,6 +165,8 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { ...@@ -163,6 +165,8 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
if (a_packs) { if (a_packs) {
ctx->a_id = stream_nr++; ctx->a_id = stream_nr++;
ast = av_new_stream(s, ctx->a_id); ast = av_new_stream(s, ctx->a_id);
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_S16LE; ast->codec->codec_id = CODEC_ID_PCM_S16LE;
ast->codec->channels = 2; ast->codec->channels = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment