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 00A0B4BA49 for ; Tue, 22 Jul 2025 12:46:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 0251268D286; Tue, 22 Jul 2025 15:46:05 +0300 (EEST) Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 2041B68B9F3 for ; Tue, 22 Jul 2025 15:45:57 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=MS BR7Ve0lSa1bScMDv5k3oVQKqVJHWzCKcd/xgzxiUU=; b=iRDkv3ZAp9UaZdFVgP kY6/3IvocBB1xkkJlTxPYJ1sZJBGlArGhjH9JkXmTTH0TQP3STputbE1r5w6XCGL 07T99ZIzg8YDv2kOfHZefh7fXHIwC2+Ne40vedp9+fraK5LmLLRN+PcX7C5aK8ac R5nCqhwiYnRQ95fbPA1P7LFTA= Received: from 6308325SC00857 (unknown []) by gzga-smtp-mtada-g0-1 (Coremail) with SMTP id _____wCnDtcCiH9onKxUGg--.12331S2; Tue, 22 Jul 2025 20:45:55 +0800 (CST) From: zhaozhenghang <15083277223@163.com> To: ffmpeg-devel@ffmpeg.org Date: Tue, 22 Jul 2025 20:45:52 +0800 Message-ID: <20250722124552.885-1-15083277223@163.com> X-Mailer: git-send-email 2.50.1.windows.1 MIME-Version: 1.0 X-CM-TRANSID: _____wCnDtcCiH9onKxUGg--.12331S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7XrW5uFWxGFyxuw4DJw4fKrg_yoWktrX_Kr 1rWF1UArWjyFZrua1jkw4rKw4vqr93CF40gFnFyr48XrZ2qrykXa97W3sxJFZ8JFZxur45 AanrZr93Gr1a9jkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7VUUnYFJUUUUU== X-Originating-IP: [43.228.36.3] X-CM-SenderInfo: bprvimitsxljist6il2tof0z/xtbBXxiSjmh-gpxWIAAAsk Subject: [FFmpeg-devel] [PATCH 1/1] libavformat/mov.c : rm 'statement will never be executed' warning 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: zhaozhenghang <15083277223@163.com> 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: In my development scenario, CONFIG_H261_DECODER, CONFIG_H263_DECODER, and CONFIG_MPEG4_DECODER are set to 0 by default, resulting in a "statement will never be executed" warning during compilation. To enhance code robustness, this patch fixes the warning. Signed-off-by: zhaozhenghang <15083277223@163.com> --- libavformat/mov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index ccaa988e4b..4a4641d51b 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5222,6 +5222,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) return ret; } +#if CONFIG_H261_DECODER || CONFIG_H263_DECODER || CONFIG_MPEG4_DECODER switch (st->codecpar->codec_id) { #if CONFIG_H261_DECODER case AV_CODEC_ID_H261: @@ -5236,7 +5237,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) st->codecpar->height= 0; break; } - +#endif // If the duration of the mp3 packets is not constant, then they could need a parser if (st->codecpar->codec_id == AV_CODEC_ID_MP3 && sc->time_scale == st->codecpar->sample_rate) { -- 2.50.1.windows.1 _______________________________________________ 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".