From patchwork Sun Nov 24 15:45:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 16399 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 AFCE1449B0C for ; Sun, 24 Nov 2019 17:47:56 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9602668AB81; Sun, 24 Nov 2019 17:47:56 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-3.mx.upcmail.net (vie01a-dmta-pe03-3.mx.upcmail.net [62.179.121.162]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7D49068A62A for ; Sun, 24 Nov 2019 17:47:49 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1iYu73-00079B-0E for ffmpeg-devel@ffmpeg.org; Sun, 24 Nov 2019 16:47:49 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Yu65imPl9wlysYu65if1pu; Sun, 24 Nov 2019 16:46:49 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=E5OzWpVl c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=bug78-Adj3AdAXPyfoUA:9 a=JXiEJ4efb5s3WdTj:21 a=t0AoIeZhlbHNY2tZ:21 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 24 Nov 2019 16:45:05 +0100 Message-Id: <20191124154506.6257-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191124154506.6257-1-michael@niedermayer.cc> References: <20191124154506.6257-1-michael@niedermayer.cc> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfJw/WnqQkctT+1T+Vkn6k01AzhLTHRx1F550F73GdkH8k7N1nsqKRSSJC94NKZQq0TwSOUc8ROsCBQhffJwcVebdwgM3NLz0M1wjTbP8QoQpaxHH58pz gzTMZWfVmcHmOKag3TKtTH+Whnd0XkBRV4Q34456wkwnfFYb3sOn6r/F Subject: [FFmpeg-devel] [PATCH 4/5] avformat/oggparsetheora: Replace get_bits_long() by get_bits() where possible 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavformat/oggparsetheora.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c index b0c0edc7a5..87a676fe48 100644 --- a/libavformat/oggparsetheora.c +++ b/libavformat/oggparsetheora.c @@ -65,7 +65,7 @@ static int theora_header(AVFormatContext *s, int idx) /* 0x80"theora" */ skip_bits_long(&gb, 7 * 8); - thp->version = get_bits_long(&gb, 24); + thp->version = get_bits(&gb, 24); if (thp->version < 0x030100) { av_log(s, AV_LOG_ERROR, "Too old or unsupported Theora (%x)\n", thp->version); @@ -79,8 +79,8 @@ static int theora_header(AVFormatContext *s, int idx) skip_bits(&gb, 100); if (thp->version >= 0x030200) { - int width = get_bits_long(&gb, 24); - int height = get_bits_long(&gb, 24); + int width = get_bits(&gb, 24); + int height = get_bits(&gb, 24); if (width <= st->codecpar->width && width > st->codecpar->width - 16 && height <= st->codecpar->height && height > st->codecpar->height - 16) { st->codecpar->width = width; @@ -99,8 +99,8 @@ static int theora_header(AVFormatContext *s, int idx) } avpriv_set_pts_info(st, 64, timebase.num, timebase.den); - st->sample_aspect_ratio.num = get_bits_long(&gb, 24); - st->sample_aspect_ratio.den = get_bits_long(&gb, 24); + st->sample_aspect_ratio.num = get_bits(&gb, 24); + st->sample_aspect_ratio.den = get_bits(&gb, 24); if (thp->version >= 0x030200) skip_bits_long(&gb, 38);