From patchwork Wed Sep 26 22:00:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 10496 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:1286:0:0:0:0:0 with SMTP id 6-v6csp1234160jap; Wed, 26 Sep 2018 15:01:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV60JXVs9BSPzHDYdeD+0yugc4YSh02wXaTatZAqnzguCMtkkeHFejuFoostpZRA0IvGOlgrr X-Received: by 2002:a5d:4206:: with SMTP id n6-v6mr6280412wrq.260.1537999295922; Wed, 26 Sep 2018 15:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537999295; cv=none; d=google.com; s=arc-20160816; b=qE5t4aEHMn6OmOjgiF622Z/WJhroPx4zWXFgD86s7JiOg5cGG6/2KozCvGnr0V0Exh WaP114W3uffUiRHAmk9u0SyNEn3D9DALCoXJn0a9j5lM6gKcLzulCEmtoam8AIKLRc2W IA7T3uO2QcO3+H8QTJx/y0FEFVZhAXTyfqfNN/OFejmYVXkXJIYKg9A/mmMLPWpen93X 36DneXKi2+/JKqySadGMF67j8M7j8pyUxue1hTiYLYz/bEFq1Brw7UEM5TPrEYShphGh vJILtFR9FuYfCwUQ7wdXUxmEoLIgyXLRAbYqqOTH2K9gszGrwp8yraAHjF5tcQWcTxy1 r9XQ== 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=RmJO0T+I9K5Ulvxb6YAOGa2DsVOZwv+KqxRXvtpkSUQ=; b=Xg9FzqMa+/Lk16qeN0ElvDDRWpbIZfQZ0+CfOwqDDdr0mxacJ2wCr79hNvSExi7TQQ lm0tus+aZzVCAbQfQzexv+ZNkhg1Mt2f2yNebq2c45K/Wya59DRGS/vTFHrOSGIKVx0G FEKzwlCb3oIGv3ri9lu0/vgjOZ1IFfByGkjMGtFYREXdM8mRjVep+G1WZcRJwTNLjQC4 KpJSDGega8gscN9fl/0D7hcs/n1N2oLeBAdq8E7pD2Xk1a6TpRVdglRJI7RZ3Fa4ku8i mfh/wli43O2mfK8sxP2tlX9WMF+poBGUjPFIC5D4B8sYYOMYUyxynX8JFsi+CNlqFFRN 83Hw== 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 n4-v6si491348wmn.138.2018.09.26.15.01.35; Wed, 26 Sep 2018 15:01:35 -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 4F02768A518; Thu, 27 Sep 2018 01:01:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe02-3.mx.upcmail.net (vie01a-qmta-pe02-3.mx.upcmail.net [62.179.121.183]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0E02D68A0E1 for ; Thu, 27 Sep 2018 01:01:11 +0300 (EEST) Received: from [172.31.218.48] (helo=vie01a-dmta-pe06-3.mx.upcmail.net) by vie01a-pqmta-pe02.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1g5Hs7-0007Y8-9o for ffmpeg-devel@ffmpeg.org; Thu, 27 Sep 2018 00:01:27 +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 1g5Hs1-0007Tr-O8 for ffmpeg-devel@ffmpeg.org; Thu, 27 Sep 2018 00:01:21 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id gN1H1y01h0S5wYM01N1J8H; Thu, 27 Sep 2018 00:01:18 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 27 Sep 2018 00:00:24 +0200 Message-Id: <20180926220026.29751-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] avformat/utils: Do not ignore failure in extract_extradata_init() 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" We check for the documented explanation of the "Ignore code" in extract_extradata_check() already Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index c973a7e0c5..7e5783c14c 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3489,13 +3489,9 @@ static int extract_extradata_init(AVStream *st) i->extract_extradata.bsf->time_base_in = st->time_base; - /* if init fails here, we assume extracting extradata is just not - * supported for this codec, so we return success */ ret = av_bsf_init(i->extract_extradata.bsf); - if (ret < 0) { - av_bsf_free(&i->extract_extradata.bsf); - ret = 0; - } + if (ret < 0) + goto fail; finish: i->extract_extradata.inited = 1;