diff options
author | James Almer <jamrial@gmail.com> | 2019-11-30 11:26:17 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-11-30 11:34:58 -0300 |
commit | e5db2e96c02da32407c425d7805b9c32808ced3d (patch) | |
tree | 46405c680971c64d741588c4a74c44cfc5d6a65a /libavformat/avc.c | |
parent | 99d78e4f424918c6584b358cd98cfc6165c5d158 (diff) | |
download | ffmpeg-e5db2e96c02da32407c425d7805b9c32808ced3d.tar.gz |
avformat/avc: add missing return error value
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/avc.c')
-rw-r--r-- | libavformat/avc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/avc.c b/libavformat/avc.c index 2fb16872c4..e4e82e1864 100644 --- a/libavformat/avc.c +++ b/libavformat/avc.c @@ -198,8 +198,10 @@ int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len) if (sps[3] != 66 && sps[3] != 77 && sps[3] != 88) { H264SequenceParameterSet *seq = ff_avc_decode_sps(sps + 3, sps_size - 3); - if (!seq) + if (!seq) { + ret = AVERROR(ENOMEM); goto fail; + } avio_w8(pb, 0xfc | seq->chroma_format_idc); /* 6 bits reserved (111111) + chroma_format_idc */ avio_w8(pb, 0xf8 | (seq->bit_depth_luma - 8)); /* 5 bits reserved (11111) + bit_depth_luma_minus8 */ avio_w8(pb, 0xf8 | (seq->bit_depth_chroma - 8)); /* 5 bits reserved (11111) + bit_depth_chroma_minus8 */ |