From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 20D2F4DFCD for ; Fri, 6 Jun 2025 03:09:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 6E16068B78B; Fri, 6 Jun 2025 06:09:29 +0300 (EEST) Received: from mail.chinaffmpeg.org (unknown [101.33.120.246]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id CF2BE68B78B for ; Fri, 6 Jun 2025 06:09:22 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=chinaffmpeg.org; s=mail; t=1749178928; bh=EB8r+03pRIEg2GBpBKhcMyVYV4WMHQzVtNoxxiMN+5w=; h=From:To:Cc:Subject; b=Hh/SwiCig9FbXt0brA5I8mDszzarxAi4fsEwKHJ0in+E5tsHJspjg2jDn2sMPE5xl iiPhaz0PPci+13B9xAxUvlSvlR8Wnx9+NvG5IZ9SggiPO4eHWOsCUr7bZ+Vy2Ke2SU gsJW751bbS2cWcvEQkUWKq5peT68vNtSOzmGNEaBTAP9YaFHYFyQu4/SCs2hblZmCk H5hX8c+DsOHGyP84HfLCRkdoFZ1atH8REVYhFNv9if6knL2WhuMeB0aL9vHI6avG9J m3rwSIW3TJwMg/vF8xEjkTwAn3BfWfzSCqu58F7Tk6Tn2dt3H1yZTPbv/RTYknFINN dSBE1MYnvHojg== From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Fri, 6 Jun 2025 11:02:05 +0800 Message-Id: <20250606030206.67340-1-lq@chinaffmpeg.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avformat/whip: Remove unnecessary pkt 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 Cc: Steven Liu 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: h264_annexb_insert_sps_pps (called after write_packet) reorganizes PPS, SPS, and IDR packets in H.264 streams. Since write_packet already validates pkt, redundant null checks in h264_annexb_insert_sps_pps can be removed. Signed-off-by: Steven Liu --- libavformat/whip.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 0671e23635..ce06a66bc4 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -1660,8 +1660,6 @@ static int h264_annexb_insert_sps_pps(AVFormatContext *s, AVPacket *pkt) uint8_t unit_type, sps_seen = 0, pps_seen = 0, idr_seen = 0, *out; const uint8_t *buf, *buf_end, *r1; - if (!pkt || !pkt->data || pkt->size <= 0) - return ret; if (!par || !par->extradata || par->extradata_size <= 0) return ret; -- 2.39.3 (Apple Git-146) _______________________________________________ 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".