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 630534A863 for ; Sat, 18 May 2024 13:51:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B600E68CEB8; Sat, 18 May 2024 16:50:57 +0300 (EEST) Received: from smtp1.dnsmadeeasy.com (smtp1.dnsmadeeasy.com [208.94.147.128]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4C75668C904 for ; Sat, 18 May 2024 16:50:50 +0300 (EEST) Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 57AC82F8009E; Sat, 18 May 2024 13:50:49 +0000 (UTC) X-Authenticated-Name: nate@nmssoftware.com Received: from stor01 (unknown [129.224.199.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.dnsmadeeasy.com (Postfix) with ESMTPSA; Sat, 18 May 2024 13:50:49 +0000 (UTC) Received: from marcus.rpi.local (unknown [192.168.26.125]) by stor01 (Postfix) with ESMTP id 7116C1CC710; Sat, 18 May 2024 08:50:48 -0500 (CDT) From: Marcus B Spencer To: ffmpeg-devel@ffmpeg.org Date: Sat, 18 May 2024 08:50:39 -0500 Message-Id: <20240518135039.12362-1-marcus@marcusspencer.xyz> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/aacdec: strictly conform to K&R style 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: Marcus B Spencer 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 the K&R style, a single-statement block does not have braces. Edit the code to conform to this rule. It is FFmpeg's code formatting convention to use K&R style. Signed-off-by: Marcus B Spencer --- libavformat/aacdec.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c index e267886e1a..3901a1dba8 100644 --- a/libavformat/aacdec.c +++ b/libavformat/aacdec.c @@ -49,13 +49,12 @@ static int adts_aac_probe(const AVProbeData *p) for (frames = 0; buf2 < end; frames++) { uint32_t header = AV_RB16(buf2); if ((header & 0xFFF6) != 0xFFF0) { - if (buf != buf0) { + if (buf != buf0) // Found something that isn't an ADTS header, starting // from a position other than the start of the buffer. // Discard the count we've accumulated so far since it // probably was a false positive. frames = 0; - } break; } fsize = (AV_RB32(buf2 + 3) >> 13) & 0x1FFF; @@ -143,9 +142,8 @@ static int handle_id3(AVFormatContext *s, AVPacket *pkt) int ret; ret = av_append_packet(s->pb, pkt, ff_id3v2_tag_len(pkt->data) - pkt->size); - if (ret < 0) { + if (ret < 0) return ret; - } ffio_init_read_context(&pb, pkt->data, pkt->size); ff_id3v2_read_dict(&pb.pub, &metadata, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); @@ -175,9 +173,8 @@ retry: if (ret < 0) return ret; - if (ret < ADTS_HEADER_SIZE) { + if (ret < ADTS_HEADER_SIZE) return AVERROR(EIO); - } if ((AV_RB16(pkt->data) >> 4) != 0xfff) { // Parse all the ID3 headers between frames @@ -185,9 +182,8 @@ retry: av_assert2(append > 0); ret = av_append_packet(s->pb, pkt, append); - if (ret != append) { + if (ret != append) return AVERROR(EIO); - } if (!ff_id3v2_match(pkt->data, ID3v2_DEFAULT_MAGIC)) { av_packet_unref(pkt); ret = adts_aac_resync(s); @@ -200,9 +196,8 @@ retry: } fsize = (AV_RB32(pkt->data + 3) >> 13) & 0x1FFF; - if (fsize < ADTS_HEADER_SIZE) { + if (fsize < ADTS_HEADER_SIZE) return AVERROR_INVALIDDATA; - } ret = av_append_packet(s->pb, pkt, fsize - pkt->size); -- 2.39.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".