avcodec/h264_slice: Remove dead sps check

Fixes: CID1439574 Dereference after null check

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a68aa951b21b8b7db0a5200bcfebc0a077a5f094)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-05-06 03:17:26 +02:00
parent 0a27f1d331
commit 148a3ed506
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -1551,7 +1551,7 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl,
sps = h->ps.sps;
if (sps && sps->bitstream_restriction_flag &&
if (sps->bitstream_restriction_flag &&
h->avctx->has_b_frames < sps->num_reorder_frames) {
h->avctx->has_b_frames = sps->num_reorder_frames;
}