Commit d9655890 authored by Jun Zhao's avatar Jun Zhao

lavf/vividas: check avformat_new_stream() return

check avformat_new_stream() return.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent c1ed00fd
...@@ -317,6 +317,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * ...@@ -317,6 +317,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *
for (i = 0; i < num_video; i++) { for (i = 0; i < num_video; i++) {
AVStream *st = avformat_new_stream(s, NULL); AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->id = i; st->id = i;
...@@ -350,6 +352,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * ...@@ -350,6 +352,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *
for(i=0;i<viv->num_audio;i++) { for(i=0;i<viv->num_audio;i++) {
int q; int q;
AVStream *st = avformat_new_stream(s, NULL); AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->id = num_video + i; st->id = num_video + i;
......
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