mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +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:
parent
c1ed00fd18
commit
d965589022
@ -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…
x
Reference in New Issue
Block a user