From patchwork Mon Sep 5 13:57:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Bouron X-Patchwork-Id: 430 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp122872vsd; Mon, 5 Sep 2016 07:14:06 -0700 (PDT) X-Received: by 10.28.104.6 with SMTP id d6mr14896332wmc.73.1473084846390; Mon, 05 Sep 2016 07:14:06 -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 o15si11060708wmd.3.2016.09.05.07.14.00; Mon, 05 Sep 2016 07:14:06 -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; dkim=neutral (body hash did not verify) header.i=@gmail.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; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ABA94689FAB; Mon, 5 Sep 2016 17:13:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B1904689F2D for ; Mon, 5 Sep 2016 17:13:43 +0300 (EEST) Received: by mail-wm0-f68.google.com with SMTP id a6so2379522wmc.2 for ; Mon, 05 Sep 2016 07:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=yxlYKY8XeuOk86gRvOv45zlrzsZz30gLYN7Fw8hmTMk=; b=TDPWunwtMB6+/Q3SIuWCDrpEPqo2eC3KYrTKdkI8kN1DgOXarm5299yWojCY2abAzT TF7HBF02HOW2YQAHjIIWOrcfpS1WIW5pxTmAwhJzt5NIYN/S+5FT05BPBX/MLOAE2AKB SUHdlWa9cO6RiWFZX5deDRwJJm7stb+z0GATyIy/1FWqyYr6oKN9wCGoMOXpfqyraOEp iEpQ25VAGyR0zo6HbN2p0dX47AH6GRATCha5/ZR2XzxuwSMb5SspXgkh8DuWUsX3XfZQ QZ/4pIuhESGLZj5pE8Dwkc5iDad9y047eSrjJPSe3KXUYo0X5v1vbTEBfOCmJKVYqnay 62VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yxlYKY8XeuOk86gRvOv45zlrzsZz30gLYN7Fw8hmTMk=; b=JxviLekOOysYOzIz1+9zoLfCQtg8B2H460mMX0VPEgt8TO5qG866/Y7GPMa04GzxNa iuidURKvDg4kBbSvPsBE+4vxNzIImh+KK9ylZsx3gfTgzAN44ET9x4EcYcvN0vFT4tu+ k/75bzReZkp0JBJW2LcQzqa+K6zE9IpS9zXe8lwka+85P3xoevKcF2t/iGUlDp3kKr08 BYMgyZxmci7UDYMP0/Dn8LW9U6rhCER9lnB/DqCjwPwfRKp/BDMvE9MbPfVP6LJwY6RA AeMyp3kTwGSo7mjxZp5mrMgKhKwyjxdM8YiwW3Df4IT+9uI6dwM28Vqw1FuG4qaHSIpI z9Qw== X-Gm-Message-State: AE9vXwMHrUzCJPq+VnyqAKrEBcmc+rj16R1vg5vVZaTvE5cU88cvu0YINuaoxdljvvRL0w== X-Received: by 10.194.109.161 with SMTP id ht1mr16780485wjb.190.1473083883349; Mon, 05 Sep 2016 06:58:03 -0700 (PDT) Received: from obiwan.gopro.lcl (LPuteaux-656-1-74-135.w80-12.abo.wanadoo.fr. [80.12.80.135]) by smtp.gmail.com with ESMTPSA id wr2sm27924571wjb.12.2016.09.05.06.58.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Sep 2016 06:58:02 -0700 (PDT) From: Matthieu Bouron To: ffmpeg-devel@ffmpeg.org Date: Mon, 5 Sep 2016 15:57:53 +0200 Message-Id: <20160905135754.27226-1-matthieu.bouron@gmail.com> X-Mailer: git-send-email 2.9.3 Subject: [FFmpeg-devel] [PATCH 1/2] lavc/mediacodecdec_h264: move bsf variable declaration at the top of the function 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: Matthieu Bouron MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Matthieu Bouron --- libavcodec/mediacodecdec_h264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/mediacodecdec_h264.c b/libavcodec/mediacodecdec_h264.c index 18f186b..9b71561 100644 --- a/libavcodec/mediacodecdec_h264.c +++ b/libavcodec/mediacodecdec_h264.c @@ -129,6 +129,8 @@ static av_cold int mediacodec_decode_init(AVCodecContext *avctx) int is_avc = 0; int nal_length_size = 0; + const AVBitStreamFilter *bsf = NULL; + FFAMediaFormat *format = NULL; MediaCodecH264DecContext *s = avctx->priv_data; @@ -205,7 +207,7 @@ static av_cold int mediacodec_decode_init(AVCodecContext *avctx) goto done; } - const AVBitStreamFilter *bsf = av_bsf_get_by_name("h264_mp4toannexb"); + bsf = av_bsf_get_by_name("h264_mp4toannexb"); if(!bsf) { ret = AVERROR_BSF_NOT_FOUND; goto done;