From patchwork Wed Sep 19 16:05:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 10413 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp875158jap; Wed, 19 Sep 2018 09:07:14 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbm5FuOXkVowRiGbbk+eX1iFZE1pRQv1k0F+6gkXkcfjvmYbtFxLxLtFZkdVg5xiWXmPEc1 X-Received: by 2002:adf:f1cc:: with SMTP id z12-v6mr11129334wro.214.1537373234141; Wed, 19 Sep 2018 09:07:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537373234; cv=none; d=google.com; s=arc-20160816; b=zkx8VgF3raZFTyFOvm9FW9m6NR0QLYQ33t7KJWyEehKupDUZgADdw4El6QbaaCW/YP Hunu9XLganFyBPyJSVcoH47yf/kLhxOIRS7JRo2LNxRtJ/b/FcvtxS7p8jU8L6guZpnl 95tzsGhqVSQ+LbIo/1zyj55G18LTHwErQfaaGYcK61cFkSpC24Eiyw1iJ9kvDqCoAJ9K euzMrZ2feqK5CeHzYs7CPqDIpna0hRaXvG58Zgh5gcjJqYQwl6TSsajAegMGnk7kUc2c /QE6o5LnwgTQYBziKfurHc/VhJZHlgVECLaq0GTF7HDp6O3BLUvOmNFQyM8rnRxxIHTT ojbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=75veQhLFZojNdIaaZtgItX2TU2qfv5r8BSSDY2Vq+vE=; b=X1+JUEUo6IC7IjXXSwQBFuXo5Zex9YqK2s0rtBNpUQGBG4Yu1arOzQMFUNWf/CjA+P eAfsKMpyrKi5dwyGYqLJv1N0DKl0SUJH8Ad46etoG5d9EgGxClzyDiHf+Hizv73QGkba H8fVOUwLZ/3Vs+oarxUmP5mWMgAOhJAN1HWfRagUeZmoA1yVd0tnt1AveWaITujfjWJf tB+HY5zy+8VUZ5JgUOr9yPEKeTMPsY6Y6+PCq6MhQItLWcyNW67TXG9qZOa0AMa/gs0f dxXVnTGHBGbU2UrdHg9qavpuLYzb/B6f4Pzh/KRVGjunasJbNbFc//dKflGyNJvTcz+g 12YQ== 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 s14-v6si19943439wrq.284.2018.09.19.09.07.13; Wed, 19 Sep 2018 09:07:14 -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 2DD5668A66E; Wed, 19 Sep 2018 19:06:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-1.mx.upcmail.net (vie01a-qmta-pe01-1.mx.upcmail.net [62.179.121.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6E27A68A628 for ; Wed, 19 Sep 2018 19:06:17 +0300 (EEST) Received: from [172.31.218.48] (helo=vie01a-dmta-pe06-3.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1g2ezm-0007VI-Po for ffmpeg-devel@ffmpeg.org; Wed, 19 Sep 2018 18:06:30 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1g2ezh-00050z-Hb for ffmpeg-devel@ffmpeg.org; Wed, 19 Sep 2018 18:06:25 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id dU6F1y00g0S5wYM01U6Ggr; Wed, 19 Sep 2018 18:06:16 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 19 Sep 2018 18:05:23 +0200 Message-Id: <20180919160532.25760-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 01/10] libavformat/ty: use decimal constant for shift 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" This was the only case in the source that uses a hexadecimal shift value. The change removed a special case in respect to greping Signed-off-by: Michael Niedermayer --- libavformat/ty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/ty.c b/libavformat/ty.c index d348643f40..8230d3a2bb 100644 --- a/libavformat/ty.c +++ b/libavformat/ty.c @@ -254,7 +254,7 @@ static int analyze_chunk(AVFormatContext *s, const uint8_t *chunk) if (data_offset + hdrs[i].rec_size > CHUNK_SIZE) break; - if ((hdrs[i].subrec_type << 0x08 | hdrs[i].rec_type) == 0x3c0 && hdrs[i].rec_size > 15) { + if ((hdrs[i].subrec_type << 8 | hdrs[i].rec_type) == 0x3c0 && hdrs[i].rec_size > 15) { /* first make sure we're aligned */ int pes_offset = find_es_header(ty_MPEGAudioPacket, &chunk[data_offset], 5);