From patchwork Mon Oct 24 21:05:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 1161 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.133 with SMTP id o127csp2351348vsd; Mon, 24 Oct 2016 14:03:13 -0700 (PDT) X-Received: by 10.28.191.92 with SMTP id p89mr16248055wmf.114.1477342992961; Mon, 24 Oct 2016 14:03:12 -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 x3si18347885wjq.94.2016.10.24.14.03.11; Mon, 24 Oct 2016 14:03:12 -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 7556F689CB2; Tue, 25 Oct 2016 00:03:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from kimiko.pkh.me (pkh.me [5.196.73.185]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9329B689B07 for ; Tue, 25 Oct 2016 00:02:59 +0300 (EEST) Received: from localhost (kimiko.pkh.me [local]) by kimiko.pkh.me (OpenSMTPD) with ESMTPA id 3bc3a5c2; Mon, 24 Oct 2016 21:05:08 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Oct 2016 23:05:06 +0200 Message-Id: <20161024210507.15858-1-u@pkh.me> X-Mailer: git-send-email 2.10.0 Subject: [FFmpeg-devel] [PATCH 1/2] ffmpeg: move some unrelated code out of a filter loop 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?= MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- Not sure if the chunk is even needed --- ffmpeg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index 3b91710..e8088c0 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2317,10 +2317,9 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int eo } frame_sample_aspect= av_opt_ptr(avcodec_get_frame_class(), decoded_frame, "sample_aspect_ratio"); + if (!frame_sample_aspect->num) + *frame_sample_aspect = ist->st->sample_aspect_ratio; for (i = 0; i < ist->nb_filters; i++) { - if (!frame_sample_aspect->num) - *frame_sample_aspect = ist->st->sample_aspect_ratio; - if (i < ist->nb_filters - 1) { f = ist->filter_frame; err = av_frame_ref(f, decoded_frame);