From patchwork Fri Dec 2 23:52:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 1664 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp556130vsa; Fri, 2 Dec 2016 15:53:29 -0800 (PST) X-Received: by 10.28.134.204 with SMTP id i195mr4809097wmd.77.1480722809144; Fri, 02 Dec 2016 15:53:29 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i67si4899936wma.78.2016.12.02.15.53.28; Fri, 02 Dec 2016 15:53:29 -0800 (PST) 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 6A2CD689FA1; Sat, 3 Dec 2016 01:53:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-2.mx.upcmail.net (vie01a-dmta-pe01-2.mx.upcmail.net [62.179.121.155]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 15218689D63 for ; Sat, 3 Dec 2016 01:52:54 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cCxdW-0006Wp-E5 for ffmpeg-devel@ffmpeg.org; Sat, 03 Dec 2016 00:53:02 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id FBt11u00R0S5wYM01Bt2TS; Sat, 03 Dec 2016 00:53:02 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 3 Dec 2016 00:52:56 +0100 Message-Id: <20161202235258.26223-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161202235258.26223-1-michael@niedermayer.cc> References: <20161202235258.26223-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 3/5] avformat/ffmdec: Drop flags2, debug and codec->time_base setting 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" It should still be possible to set these through recommended_encoder_configuration Signed-off-by: Michael Niedermayer --- libavformat/ffmdec.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 25edeebb7e..f3497e2b24 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -369,8 +369,8 @@ static int ffm2_read_header(AVFormatContext *s) goto fail; } codec->flags = avio_rb32(pb); - codec->flags2 = avio_rb32(pb); - codec->debug = avio_rb32(pb); + avio_rb32(pb); + avio_rb32(pb); if (codec->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { int size = avio_rb32(pb); if (size < 0 || size >= FF_MAX_EXTRADATA_SIZE) { @@ -390,14 +390,8 @@ static int ffm2_read_header(AVFormatContext *s) ret = AVERROR(EINVAL); goto fail; } - codec->time_base.num = avio_rb32(pb); - codec->time_base.den = avio_rb32(pb); - if (codec->time_base.num <= 0 || codec->time_base.den <= 0) { - av_log(s, AV_LOG_ERROR, "Invalid time base %d/%d\n", - codec->time_base.num, codec->time_base.den); - ret = AVERROR_INVALIDDATA; - goto fail; - } + avio_rb32(pb); + avio_rb32(pb); codecpar->width = avio_rb16(pb); codecpar->height = avio_rb16(pb); ret = av_image_check_size(codecpar->width, codecpar->height, 0, s); @@ -603,18 +597,13 @@ static int ffm_read_header(AVFormatContext *s) goto fail; } codec->flags = avio_rb32(pb); - codec->flags2 = avio_rb32(pb); - codec->debug = avio_rb32(pb); + avio_rb32(pb); + avio_rb32(pb); /* specific info */ switch(codecpar->codec_type) { case AVMEDIA_TYPE_VIDEO: - codec->time_base.num = avio_rb32(pb); - codec->time_base.den = avio_rb32(pb); - if (codec->time_base.num <= 0 || codec->time_base.den <= 0) { - av_log(s, AV_LOG_ERROR, "Invalid time base %d/%d\n", - codec->time_base.num, codec->time_base.den); - goto fail; - } + avio_rb32(pb); + avio_rb32(pb); codecpar->width = avio_rb16(pb); codecpar->height = avio_rb16(pb); if (av_image_check_size(codecpar->width, codecpar->height, 0, s) < 0)