[FFmpeg-cvslog] avformat/avc: add missing return error value
James Almer
git at videolan.org
Sat Nov 30 17:03:45 EET 2019
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Nov 30 11:26:17 2019 -0300| [e5db2e96c02da32407c425d7805b9c32808ced3d] | committer: James Almer
avformat/avc: add missing return error value
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e5db2e96c02da32407c425d7805b9c32808ced3d
---
libavformat/avc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 */
More information about the ffmpeg-cvslog
mailing list