From patchwork Thu Aug 20 07:05:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hwren X-Patchwork-Id: 21757 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 8A09444ABC8 for ; Thu, 20 Aug 2020 10:05:44 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7542F68B44A; Thu, 20 Aug 2020 10:05:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from m15111.mail.126.com (m15111.mail.126.com [220.181.15.111]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CB3D168AB04 for ; Thu, 20 Aug 2020 10:05:35 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=M2gZu K1bF0GbmcQ5jBOeK8rVunKfFZYIQeQaHW5Ksn4=; b=epe5eZ26QIPxbbQXQY/ey lYhFpp2yG7KwmIhEWtT05H4PS07b+gy62yx66pa+JmYTCwz4wvAq57QGW7bKxgv4 imhRzoanE1265qYRwwG2herXXGzrn0UTswll/fmkIDRiWDnX6F0q04vqG/lSqkkF ScVBbS0cYFv90PA82oWXNE= Received: from localhost.localdomain (unknown [111.34.131.254]) by smtp1 (Coremail) with SMTP id C8mowACnrFC2ID5fBKD7Ig--.32948S4; Thu, 20 Aug 2020 15:05:29 +0800 (CST) From: hwrenx@126.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Aug 2020 15:05:15 +0800 Message-Id: <20200820070515.905-3-hwrenx@126.com> X-Mailer: git-send-email 2.23.0.windows.1 In-Reply-To: <20200820070515.905-1-hwrenx@126.com> References: <20200820070515.905-1-hwrenx@126.com> MIME-Version: 1.0 X-CM-TRANSID: C8mowACnrFC2ID5fBKD7Ig--.32948S4 X-Coremail-Antispam: 1Uf129KBjvJXoW7Ar47tw1xGFykJr13AF43Wrg_yoW8Wr4Dpa nrA34rGF1Iqa4xZws7tr18KFZ8GrZ7uFyjkFZxtw15KFsavr1DXFnIkrW8CrWIgr9FqFy3 Gws8u3WUJw1Ut3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07U8kuxUUUUU= X-Originating-IP: [111.34.131.254] X-CM-SenderInfo: pkzuv0b06rjloofrz/1tbiZhiG6VpD-G9X1AABsZ Subject: [FFmpeg-devel] [PATCH 3/3] lavc/avs2_parser.c, lavf/avs2dec.c: fix code style X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: hwren Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: hwren Signed-off-by: hwren --- libavcodec/avs2_parser.c | 6 +++--- libavformat/avs2dec.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/avs2_parser.c b/libavcodec/avs2_parser.c index 02af08f079..54f687142f 100644 --- a/libavcodec/avs2_parser.c +++ b/libavcodec/avs2_parser.c @@ -34,9 +34,9 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz if (!pic_found) { for (; cur < buf_size; ++cur) { - state = (state<<8) | buf[cur]; + state = (state << 8) | buf[cur]; if (AVS2_ISUNIT(buf[cur])){ - ++cur; + cur++; pic_found = 1; break; } @@ -46,7 +46,7 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz if (pic_found) { if (!buf_size) return END_NOT_FOUND; - for (; cur < buf_size; ++cur) { + for (; cur < buf_size; cur++) { state = (state << 8) | buf[cur]; if ((state & 0xFFFFFF00) == 0x100 && state > AVS2_SLICE_MAX_START_CODE) { pc->frame_start_found = 0; diff --git a/libavformat/avs2dec.c b/libavformat/avs2dec.c index f8337ea500..51908d2b63 100644 --- a/libavformat/avs2dec.c +++ b/libavformat/avs2dec.c @@ -33,9 +33,9 @@ static int avs2_probe(const AVProbeData *p) { - uint32_t code= -1, hds=0, pic=0, seq=0; - uint8_t state=0; - const uint8_t *ptr = p->buf, *end = p->buf + p->buf_size, *sqb=0; + uint32_t code = -1, hds = 0, pic = 0, seq = 0; + uint8_t state = 0; + const uint8_t *ptr = p->buf, *end = p->buf + p->buf_size, *sqb = 0; if (AV_RB32(p->buf) != 0x1B0){ return 0; }