From: Jun Zhao <[email protected]> check avformat_new_stream() return.
Signed-off-by: Jun Zhao <[email protected]> --- libavformat/vividas.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/libavformat/vividas.c b/libavformat/vividas.c index f20af3d..16642c0 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -319,6 +319,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; @@ -352,6 +354,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; -- 1.7.1 _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
