From patchwork Tue Nov 1 09:53:40 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: 1247 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.90.1 with SMTP id o1csp570122vsb; Tue, 1 Nov 2016 02:51:34 -0700 (PDT) X-Received: by 10.28.197.67 with SMTP id v64mr760143wmf.9.1477993894916; Tue, 01 Nov 2016 02:51:34 -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 r142si29920072wmg.88.2016.11.01.02.51.34; Tue, 01 Nov 2016 02:51:34 -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 993B8689C5B; Tue, 1 Nov 2016 11:51:28 +0200 (EET) 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 4C52268975F for ; Tue, 1 Nov 2016 11:51:22 +0200 (EET) Received: from localhost (kimiko.pkh.me [local]) by kimiko.pkh.me (OpenSMTPD) with ESMTPA id 1734f11e; Tue, 1 Nov 2016 09:53:41 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 1 Nov 2016 10:53:40 +0100 Message-Id: <20161101095340.24164-1-u@pkh.me> X-Mailer: git-send-email 2.10.0 Subject: [FFmpeg-devel] [PATCH] ffmpeg: remove dead code out of the video 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" It makes no sense for this code to be inside the video filter loop, and the frame sample aspect ratio is even set unconditionally a few lines above. --- ffmpeg.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index 3b91710..7e366f2 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2180,7 +2180,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int eo int i, ret = 0, err = 0, resample_changed; int64_t best_effort_timestamp; int64_t dts = AV_NOPTS_VALUE; - AVRational *frame_sample_aspect; AVPacket avpkt; // With fate-indeo3-2, we're getting 0-sized packets before EOF for some @@ -2316,11 +2315,7 @@ 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"); 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);