avformat/avc: add missing return error value

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2019-11-30 11:26:17 -03:00
parent 99d78e4f42
commit e5db2e96c0
1 changed files with 3 additions and 1 deletions

View File

@ -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 */