From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 77BC54A772 for ; Mon, 6 May 2024 01:23:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ED8FE68D580; Mon, 6 May 2024 04:23:14 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 056DD68D503 for ; Mon, 6 May 2024 04:23:08 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 29A711BF204 for ; Mon, 6 May 2024 01:23:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714958588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0lEEDlc/eo3AQunttSmDw5mpnlC1nx+xc0aZ+ZL9U7U=; b=o+MFtzrBwoZKOgrAz71o6NUebXfvw4xCyECv+QFS+xKjg0vru83n059f6g5EF1CkdRVV+6 hJDcepnAgFQZ0M+/Zu1L8jIurBVyHytcPop7mKzoviUt11yvzq0YvmQ3VThjMqs79o9lvG AXN0lNQbr/nFc/XcZcL16KrzXN8jKsZ0N4XNDVcvP/v2g++fKp4UbG6hAVqfjhkOHHIH/l F/he6TZGig7PZzHH9f8fIX4G434/O3Oghm20QmAza9zQmz6grrKCjgts/VSpYFxCKRMi0t dzE7/6ADomDZYQ5kmdeCaqu7k4m30Hr/j99fbdWMmPIyJlYg+RWHGwLttfdVeA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 6 May 2024 03:23:07 +0200 Message-ID: <20240506012307.807589-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH] avcodec/h264_slice: Remove dead sps check X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: CID1439574 Dereference after null check Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/h264_slice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 90d37f60848..ce2c4caca1b 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1396,7 +1396,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; } -- 2.43.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".