From patchwork Fri Mar 23 19:20:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 8123 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.70 with SMTP id c67csp791959jad; Fri, 23 Mar 2018 12:21:22 -0700 (PDT) X-Google-Smtp-Source: AG47ELu7t/EZzqa1j9OBye6Cg+Mx6bjpax+8Atc56P8zoiS7T9Bqw+mfqI/7SkXk+zNoJHMpFpgl X-Received: by 10.223.185.76 with SMTP id b12mr24907515wrg.205.1521832882660; Fri, 23 Mar 2018 12:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521832882; cv=none; d=google.com; s=arc-20160816; b=k+5x/r71Vh5ms7T61YykrGq/rpG/cI9sW0DYw5stRun+4JAIeDJ5wv2NUy7bevz8iI WyhhkMvV6S7xHx6S73ACGSHbmJD1dPQeRjX2H7bTXYOf6uYCUP3QJs7T0BHAewTxsz9a oJAxc/zcf9403edpOKAb8Q3Z+9jFduchPGW9WHvERkuFe8SiQYIvtwE5omzoxz0l7mb+ 2hxaeFwO6aXP28o+5t5CF8xwmFHBZ8px4guHPCUaBc5mds7kQPBIQYinPq+GmXuXjVnK EidkCgq4Ja7+9bYmYdvOMsotgYC9Zjb31W39KXHSqRkDiPJK/1KtbYIftVIN3FT/Jwym amtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=bsnBceik4IYLsB8YEIaZ61VEUBIaMwYh2hhi0NscMOk=; b=Dky60EF+xs/zHLc/2QRjEDYVeR3ULrYsI74d8g6jh7LbE2ghrKoRtR8J//RFwjQ4cO pMw92M4DAgkdYK262GISHPHN1tR3C+qexOhxdMJU5toeJ5ubEcvkXT+ypj59J0JMfl4U DSBYlAxLlXluVom3mGt29btGbDmmT5Ip+/O/Z0ITniG2WXokbGOftL5q7KPsxt/Xuyrb T3sXHWoc6EWYItxngKYdCr9tb9kGcvWb3K7BkTfU8C7oH4brg9+66RUThY1fSlFhzlFF jqU2j5p4JDhLQ8XU2d2cQLVBfUMNtuELyojhyaUq91D9MK8+rr7QTU7oG54fYUepCFps 4B9w== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 92si6764668wrf.218.2018.03.23.12.21.21; Fri, 23 Mar 2018 12:21:22 -0700 (PDT) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 06FD5687EF1; Fri, 23 Mar 2018 21:21:04 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-2.mx.upcmail.net (vie01a-qmta-pe01-2.mx.upcmail.net [62.179.121.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1C11968044D for ; Fri, 23 Mar 2018 21:20:57 +0200 (EET) Received: from [172.31.218.50] (helo=vie01a-dmta-pe07-2.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1ezSFU-00073Y-0Z for ffmpeg-devel@ffmpeg.org; Fri, 23 Mar 2018 20:21:12 +0100 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe07.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1ezSFN-000831-VK for ffmpeg-devel@ffmpeg.org; Fri, 23 Mar 2018 20:21:05 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id RXM01x01T0S5wYM01XM1Zf; Fri, 23 Mar 2018 20:21:01 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 23 Mar 2018 20:20:35 +0100 Message-Id: <20180323192035.8284-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.16.2 Subject: [FFmpeg-devel] [PATCH] avcodec/get_bits: Document skip_bits_long() 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Found-by: Kieran Signed-off-by: Michael Niedermayer --- libavcodec/get_bits.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index 0c7f5ff0c6..3ec45e7ab6 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -201,6 +201,13 @@ static inline int get_bits_count(const GetBitContext *s) return s->index; } +/** + * Skips the specified number of bits. + * @param n the number of bits to skip, + * For the UNCHECKED_BITSTREAM_READER this must not cause the distance + * from the start to overflow int32_t. Staying within the bitstream + padding + * is sufficient too. + */ static inline void skip_bits_long(GetBitContext *s, int n) { #if UNCHECKED_BITSTREAM_READER