From patchwork Tue Sep 13 08:51:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 560 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp2032400vsd; Tue, 13 Sep 2016 01:51:13 -0700 (PDT) X-Received: by 10.28.10.136 with SMTP id 130mr11053308wmk.115.1473756673198; Tue, 13 Sep 2016 01:51:13 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id fm7si19795411wjc.6.2016.09.13.01.51.12; Tue, 13 Sep 2016 01:51:13 -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 C3E3F689FBE; Tue, 13 Sep 2016 11:50:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from kimiko.pkh.me (ns3001740.ip-5-196-73.eu [5.196.73.185]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 87B46689FAE for ; Tue, 13 Sep 2016 11:50:51 +0300 (EEST) Received: from localhost (kimiko.pkh.me [local]) by kimiko.pkh.me (OpenSMTPD) with ESMTPA id fcc59e4d; Tue, 13 Sep 2016 08:51:29 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 13 Sep 2016 10:51:25 +0200 Message-Id: <20160913085126.10977-2-u@pkh.me> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160913085126.10977-1-u@pkh.me> References: <20160913085126.10977-1-u@pkh.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] lavf/utils: simplify matching MOV-like formats 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: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Clément Bœsch --- libavformat/utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 92a29ae..acb781e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -5315,9 +5315,7 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, enc_ctx->ticks_per_frame = 2; } } else if (!(ofmt->flags & AVFMT_VARIABLE_FPS) - && strcmp(ofmt->name, "mov") && strcmp(ofmt->name, "mp4") && strcmp(ofmt->name, "3gp") - && strcmp(ofmt->name, "3g2") && strcmp(ofmt->name, "psp") && strcmp(ofmt->name, "ipod") - && strcmp(ofmt->name, "f4v")) { + && !av_match_name(ofmt->name, "mov,mp4,3g2,psp,ipod,f4v")) { if (copy_tb == AVFMT_TBCF_AUTO && dec_ctx->time_base.den && av_q2d(dec_ctx->time_base)*dec_ctx->ticks_per_frame > av_q2d(ist->time_base) && av_q2d(ist->time_base) < 1.0/500