diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-09-11 10:14:01 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-09-11 11:06:45 +0000 |
commit | 848ad8db2208cccfd671f1362a0b2c7a91ee1541 (patch) | |
tree | a1fba815ac77949f57232cabcecb61ed0a06f975 /libavformat | |
parent | f2e614e7e9cb294fe4d14e36637709c57884f64c (diff) | |
download | ffmpeg-848ad8db2208cccfd671f1362a0b2c7a91ee1541.tar.gz |
avformat/libnut: check avformat_new_stream() return value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/libnut.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/libnut.c b/libavformat/libnut.c index 838c55a403..71479982c3 100644 --- a/libavformat/libnut.c +++ b/libavformat/libnut.c @@ -223,6 +223,9 @@ static int nut_read_header(AVFormatContext * avf) { AVStream * st = avformat_new_stream(avf, NULL); int j; + if (!st) + return AVERROR(ENOMEM); + for (j = 0; j < s[i].fourcc_len && j < 8; j++) st->codec->codec_tag |= s[i].fourcc[j]<<(j*8); st->codec->has_b_frames = s[i].decode_delay; |