Browse Source

lavf/vividas: check avformat_new_stream() return

check avformat_new_stream() return.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
tags/n4.3
Jun Zhao 5 years ago
parent
commit
d965589022
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/vividas.c

+ 4
- 0
libavformat/vividas.c View File

@@ -317,6 +317,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *

for (i = 0; i < num_video; i++) {
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);

st->id = i;

@@ -350,6 +352,8 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *
for(i=0;i<viv->num_audio;i++) {
int q;
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);

st->id = num_video + i;



Loading…
Cancel
Save