From patchwork Tue Dec 20 21:50:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ronald S. Bultje" X-Patchwork-Id: 1869 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp1932166vsa; Tue, 20 Dec 2016 13:57:06 -0800 (PST) X-Received: by 10.194.113.129 with SMTP id iy1mr1256152wjb.127.1482271025952; Tue, 20 Dec 2016 13:57:05 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s5si20921197wma.130.2016.12.20.13.57.03; Tue, 20 Dec 2016 13:57:05 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3E98268A1D2; Tue, 20 Dec 2016 23:57:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EBC22689FF1 for ; Tue, 20 Dec 2016 23:56:53 +0200 (EET) Received: by mail-qt0-f193.google.com with SMTP id m48so24589144qta.2 for ; Tue, 20 Dec 2016 13:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iYEYUAUkyLugryD5iLW1hLAR/UJ2NiHudhFYCD5Dypg=; b=dAT2R8VqH12xTawdpTp+vwPO37PzemptVtSR79JcCw1JDlcLXA7n3pFWvy9wIL/MkG igXUEy6YcX8bU83aaQ/8Q57S9bEfcFz6faxsHsCCEYBIQsk/bNczTrzj9NZg2/dUczmP wwF018aFeAukGorpUVPqVNRyz4XekWOlNs71r5AZq8hBfXJC5SVtPnmZKl2810Cx+eqZ /Iks7ZlAqNyFoOsB4BfTW9B0Up8HRBYFgzPb94LouFTx/yRiHIk/l8boEbKW6EcRu5tG t/QMmYE4bCHnAQxQ5gP9kBOn3D9jl1K3oGp76uQR2v0Byl2Ca3f48fYvZma5DmkD21so CD4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iYEYUAUkyLugryD5iLW1hLAR/UJ2NiHudhFYCD5Dypg=; b=JHfIKJdOMBUiBOpVw3cXf3trle+74RdNEFGI4jatm1pSsCbEG9qtR7SOQDT9jvepv8 claysyFNBlOK6dwVzptCBz6kTsVpkm3O7rHKkKC47h5egYYgUhtIIfMdfl1m4iUuFNia vaM622UDzWbCjo+SXpqao/A/xA5Td9JoCqr/l/K4A8Xmg0UIoVQQ3WylGbPOCngyIcqf 4kDtmu8HzJsJRzprv3Mtif5+HUhJyqXnzV1KCoeUQoxVGSLlo9uD7IuaMHGvoBH+3uDc GzYLpeulIO2CM/nR/mV2sENxHPH27B361SaK1BPCK5CK+7VYYQB0MuDM/MB+reIxcMpq GfhA== X-Gm-Message-State: AIkVDXL42hTu48CnvgOLf7f7Tilz6rZkpSKxABx56Eo2wGZQjKSuaZE60i5Im5sM9JtR2w== X-Received: by 10.200.47.229 with SMTP id m34mr1641345qta.218.1482270625350; Tue, 20 Dec 2016 13:50:25 -0800 (PST) Received: from localhost.localdomain ([65.206.95.146]) by smtp.gmail.com with ESMTPSA id i19sm14032448qte.8.2016.12.20.13.50.24 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 20 Dec 2016 13:50:24 -0800 (PST) From: "Ronald S. Bultje" To: ffmpeg-devel@ffmpeg.org Date: Tue, 20 Dec 2016 16:50:19 -0500 Message-Id: <1482270619-16658-2-git-send-email-rsbultje@gmail.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1482270619-16658-1-git-send-email-rsbultje@gmail.com> References: <1482270619-16658-1-git-send-email-rsbultje@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/2] wmavoice: reindent. 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: "Ronald S. Bultje" MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavcodec/wmavoice.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index 5001b0b..5393003 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -1887,23 +1887,23 @@ static int wmavoice_decode_packet(AVCodecContext *ctx, void *data, /* If the packet header specifies a s->spillover_nbits, then we want * to push out all data of the previous packet (+ spillover) before * continuing to parse new superframes in the current packet. */ - if (s->sframe_cache_size > 0) { - int cnt = get_bits_count(gb); - copy_bits(&s->pb, avpkt->data, size, gb, s->spillover_nbits); - flush_put_bits(&s->pb); - s->sframe_cache_size += s->spillover_nbits; - if ((res = synth_superframe(ctx, data, got_frame_ptr)) == 0 && - *got_frame_ptr) { - cnt += s->spillover_nbits; - s->skip_bits_next = cnt & 7; - res = cnt >> 3; - return FFMIN(avpkt->size, res); - } else - skip_bits_long(gb, s->spillover_nbits - cnt + - get_bits_count(gb)); // resync - } else if (s->spillover_nbits) { - skip_bits_long(gb, s->spillover_nbits); // resync - } + if (s->sframe_cache_size > 0) { + int cnt = get_bits_count(gb); + copy_bits(&s->pb, avpkt->data, size, gb, s->spillover_nbits); + flush_put_bits(&s->pb); + s->sframe_cache_size += s->spillover_nbits; + if ((res = synth_superframe(ctx, data, got_frame_ptr)) == 0 && + *got_frame_ptr) { + cnt += s->spillover_nbits; + s->skip_bits_next = cnt & 7; + res = cnt >> 3; + return FFMIN(avpkt->size, res); + } else + skip_bits_long(gb, s->spillover_nbits - cnt + + get_bits_count(gb)); // resync + } else if (s->spillover_nbits) { + skip_bits_long(gb, s->spillover_nbits); // resync + } } else if (s->skip_bits_next) skip_bits(gb, s->skip_bits_next);