You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user