You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/libnut: check avformat_new_stream() return value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -223,6 +223,9 @@ static int nut_read_header(AVFormatContext * avf) {
|
|||||||
AVStream * st = avformat_new_stream(avf, NULL);
|
AVStream * st = avformat_new_stream(avf, NULL);
|
||||||
int j;
|
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);
|
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;
|
st->codec->has_b_frames = s[i].decode_delay;
|
||||||
|
Reference in New Issue
Block a user