Fixes: CID1594529 Unchecked return value
Unified · Split
| @@ -922,7 +922,9 @@ static int set_avcc_extradata(AVCodecContext *avctx, x264_nal_t *nal, int nnal) · 921 unmodified lines | |||
| 922 | * | 922 | * |
| 923 | * +4 to skip until sps id. | 923 | * +4 to skip until sps id. |
| 924 | */ | 924 | */ |
| 925 | init_get_bits8(&gbc, sps + 4, sps_nal->i_payload - 4 - 4); | 925 | ret = init_get_bits8(&gbc, sps + 4, sps_nal->i_payload - 4 - 4); |
| 926 | if (ret < 0) | ||
| 927 | return ret; | ||
| 926 | // Skip sps id | 928 | // Skip sps id |
| 927 | get_ue_golomb_31(&gbc); | 929 | get_ue_golomb_31(&gbc); |
| 928 | chroma_format_idc = get_ue_golomb_31(&gbc); | 930 | chroma_format_idc = get_ue_golomb_31(&gbc); |