From patchwork Sat Jul 25 15:24:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 21257 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id CD44844AD70 for ; Sat, 25 Jul 2020 18:24:36 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9D00268ACD0; Sat, 25 Jul 2020 18:24:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from qq.com (out203-205-221-249.mail.qq.com [203.205.221.249]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A35C6882B6 for ; Sat, 25 Jul 2020 18:24:27 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1595690663; bh=tLAUcREbiQsZ2Vxlk5SAdUOdcVtjcb7AwUcc35K5bpo=; h=From:To:Cc:Subject:Date; b=Ftvbw7x7xOJ+LUamHy046vC/8G4aP4uaUyoJKt60V9qBm0r6dnUjpNykWxvOaTxh1 fUYnIHJuBYg0t/na+uJS80mPqqTYR/I7H0FTuaBnyGYmSa4Jr6aXfAdnp2jBQW+EPu U6+kkpliKI0tGaPuLsvNnl7us8urV6twcGpFSwmg= Received: from localhost.localdomain ([27.46.106.24]) by newxmesmtplogicsvrszb5.qq.com (NewEsmtp) with SMTP id 6140C4BA; Sat, 25 Jul 2020 23:24:20 +0800 X-QQ-mid: xmsmtpt1595690660tnjm3hh0n Message-ID: X-QQ-XMAILINFO: MUJ4RNX1P7MR3oLamo0sjZ3hV3fWankYQpLWSImeAFMZfoV8AzQQshbbUp8Y/y JNuqS5/NFemwOq9UjVPrPy367Aldj2Ip6A/060Mb6+nZ5EWAerVMuA8XwnM2RXoIa1vG/ahbdXiI nyIpt+fHICdKBzxlFqHgqkHyMNcbXeRxrXxtNLEOW/DOhzO+X+iuIOz48lCsJjKNFVnlCGvR5C9d SZ5IKl6ahfvIJA/XG4RIgkBJJVdCyV2u2w6X79yR890bsIp+02/RJ6VZHOzlqM9kNmadT4SlxnJx QIps2HKpXESEb9Tr1lK1f1X3VCWkY9T3AovLYciCPR1Pn0uGJcWta3uNw0l1ZKtW9xVp3kDq2hXg nrNF3HcZ2lkHbcFJDTuWIkdJM39/0A4LFUnwC7fix2Xu37u75WBcpzVQoZ+Ob9bEEya/Zc7Vh3US 6NXq9dIwH2MUw8vQZQjPybols+Paa2iGRiHowsNsccGCaqtX9A92jjKHWcYAoLgCn+6RUv+mDK5f nDt78sBYNbPC1Z0rDxlXdN7lE/mHov5zoOR5j7hcm28pcww3R8XvNNr43RgiXfu8kpySOZ55eZ4O rkfqvW3qY/5FqxxnRnxjGJeMswXdAsOODBXRqH0FN8CemluNbgkpAZ6H980Atb3HErEdsBKk9hWg kBPvyq0ocXL/F/kSqQzoj5ZwFVuG89OeAtmcnX7biSxtdnlw5u7y2hFcw= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Sat, 25 Jul 2020 23:24:16 +0800 X-OQ-MSGID: <20200725152416.254317-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] flvdec: Remove unnecessary initializations 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: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" pre_tag_size is always reset by avio_rb32(). For AVFormatContext start_time, as the document says, "NEVER set this value directly: It is deduced from the AVStream values." --- libavformat/flvdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 08622739f3..31bdbbd5e9 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -747,7 +747,7 @@ static int flv_read_header(AVFormatContext *s) int flags; FLVContext *flv = s->priv_data; int offset; - int pre_tag_size = 0; + int pre_tag_size; /* Actual FLV data at 0xe40000 in KUX file */ if(!strcmp(s->iformat->name, "kux")) @@ -773,7 +773,6 @@ static int flv_read_header(AVFormatContext *s) av_log(s, AV_LOG_WARNING, "Read FLV header error, input file is not a standard flv format, first PreviousTagSize0 always is 0\n"); } - s->start_time = 0; flv->sum_flv_tag_size = 0; flv->last_keyframe_stream_index = -1;