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 0ED9849173 for ; Mon, 6 May 2024 00:38:55 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7A87B68D54E; Mon, 6 May 2024 03:38:53 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B5D0E68D52C for ; Mon, 6 May 2024 03:38:46 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1DE67C0003 for ; Mon, 6 May 2024 00:38:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714955926; 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=hlQbf/6iX9hT0c8tBoy0ddnuqxDpxG8XYQBJ59y3Vn4=; b=R+6+mqkbYD4+lLoz302XNwecjuxMHQAfK9EcCh5PEE4GFHa3JtCE0JHE4kRAfT7s7RS/MV KIf2LE8oONG4uFuFNCj3eb8pmKw3CQ61CIeOEfXBtUPApcBzxM6mXy1ZhXdM6bDwodPtIH 18LznOD+DCIC9PDUaIKMS+5mGasH9HrwUm4R5d6HdgbNpWZUijX90zLDHc1uEWsf3dqmZy kuwoVlSZxiJLHO87XIDyYPT4ND/fFauPYivqsWGbh6qm4etreyw3xmrmgewcgq+7hUEEyZ oXLSDK5U5pqzou7BVkR6fHEG+0+xwvJwK3Fnm0XT6tumhLqJGQx2lAFyyO399Q== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 6 May 2024 02:38:45 +0200 Message-ID: <20240506003845.3956423-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/h2645_sei: Remove dead checks 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: CID1596534 Dereference after null check Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/h2645_sei.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/h2645_sei.c b/libavcodec/h2645_sei.c index 96a22e7cf6c..1deb76c765b 100644 --- a/libavcodec/h2645_sei.c +++ b/libavcodec/h2645_sei.c @@ -757,8 +757,7 @@ int ff_h2645_sei_to_frame(AVFrame *frame, H2645SEI *sei, if (!sd) av_buffer_unref(&a53->buf_ref); a53->buf_ref = NULL; - if (avctx) - avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; + avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; } ret = h2645_sei_to_side_data(avctx, sei, &frame->side_data, &frame->nb_side_data); @@ -844,8 +843,7 @@ FF_ENABLE_DEPRECATION_WARNINGS else fgc->present = fgc->persistence_flag; - if (avctx) - avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; + avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; } #if CONFIG_HEVC_SEI -- 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".