From patchwork Fri Sep 18 14:33:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 22477 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 1D33144AB94 for ; Fri, 18 Sep 2020 17:33:58 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BCD768B94F; Fri, 18 Sep 2020 17:33:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from qq.com (out203-205-221-157.mail.qq.com [203.205.221.157]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 35E2968B7E4 for ; Fri, 18 Sep 2020 17:33:49 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1600439623; bh=uBhF23taha0bLy8is8mqz4ctGrtz0TZaborh5oNh6ek=; h=From:To:Cc:Subject:Date; b=RihJw2a31igHIYAR3iw3IsUiH99gdv02XyKm4mt59XARQAZAI5euxk4At8Ntm0a6v HGPXdbIdbCIercWhAL0e5/cVUnIUqFyPYQPBBt2jjILhfjTMiFZ7ER014Ttwg/XHMv 3iJVMUm8fVu56uGkCKvXVhSO5lVDrE8GMXiUxH4k= Received: from localhost.localdomain ([27.46.80.20]) by newxmesmtplogicsvrsza8.qq.com (NewEsmtp) with SMTP id 86834E91; Fri, 18 Sep 2020 22:33:40 +0800 X-QQ-mid: xmsmtpt1600439620t3p61clgh Message-ID: X-QQ-XMAILINFO: M3/pVMGdUn80y8kRt9rCboNljFH/l9CVIVsQJebAmunT7D+T0zmynAAmCkpPoS 5niHsWVl9woTkACTc5tgFndGPrGvDJsyRG9iyYOfDEjLq//WDu4un4H2TDuHGYPcGfIGtLoFuTuZ W40R/6Pmwf68sDatlHkdiODjJo+raAwSZE+a2UNevbvFKDJf+m15EuiopBLIqlZygFCMzCnL4DSC DxVlhqyEafH7Dys1L22H62N7Ox6c4j2zGVkJFZjFO2wLYHte4jk/3OKkuvq0Z1aozn1xsz6V2PCW tWsHDDfEKWZdAyl7a3x/XntR0akpi1lyhh8rcoVj/Nah/kuAvIAJM517Abn/rRSLZWtBz6XCcp7E 6Ouf+bmC4LR6v77nSHKueraDR1exu48QNnz3i/ZPCad/wfdx/o24W2PKvzgPXeO8MkKYvQC8mXwy +ZCrtFhjjT59E2pzXDi02Hoz2UiT/B15p3aBdNdnXpUAbMEfjsM3fQ6CUwWo5mugx/bUPnXYxOTE fCG7zH7+L/YBcMbWAJ178wv9jhaSFzyjGRgdHk9g7Uiu3bH1eJ9x126DzmAy6YPd/lIcSe0qQkjz eKgo7ndLMI5EhjJYXhhL3eTjK+yMY1nycdPu1bUjC0FHHkGZUQ9vkIMf18PZxw1PYtQrGxWL/TXm lV5jw8iJx9as24g1CuTqgZgCZlJ9P9N9GhCWOCIrEjoIs4f4+6hlQliJoBfGm3sxZtYKAO6gs2S9 W8L+mdryHPzc4DwxtLND45bQ== From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Fri, 18 Sep 2020 22:33:36 +0800 X-OQ-MSGID: <20200918143338.26104-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] avformat/mov: replace multiple avio_r8() by avio_skip() 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" From: Zhao Zhili --- libavformat/mov.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 9462af743a..8c1243b48d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -103,9 +103,7 @@ static int mov_metadata_int8_bypass_padding(MOVContext *c, AVIOContext *pb, unsigned len, const char *key) { /* bypass padding bytes */ - avio_r8(pb); - avio_r8(pb); - avio_r8(pb); + avio_skip(pb, 3); c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED; av_dict_set_int(&c->fc->metadata, key, avio_r8(pb), 0); From patchwork Fri Sep 18 14:33:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 22478 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 212FE44AB94 for ; Fri, 18 Sep 2020 17:33:59 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 07C9068B9E3; Fri, 18 Sep 2020 17:33:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from qq.com (out203-205-251-36.mail.qq.com [203.205.251.36]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 68E9B68B84D for ; Fri, 18 Sep 2020 17:33:50 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1600439625; bh=49dIaja1ZubfJI6Y+i9iThw47JceJjxk9SbWyVggRak=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FDlpRbrOPAjPuh3Md4jN3xPA7PMyfxJmMxhDzCuaQ8HwvggeuGgmDPMAC0CNuhQsn aZI/Lc5DCC2gvHVDAd8HBBzLM6A7ULLq5OumujFCug4Bfu4lkC9/YniH6TTaX77zbl ORUK5+dWbi1JaTatsuNd1iP0rjsh2GUmW20+mvlo= Received: from localhost.localdomain ([27.46.80.20]) by newxmesmtplogicsvrsza8.qq.com (NewEsmtp) with SMTP id 86834E91; Fri, 18 Sep 2020 22:33:40 +0800 X-QQ-mid: xmsmtpt1600439621tngkb2mli Message-ID: X-QQ-XMAILINFO: MUX0Fcv92NUejzXcumbgX229MdTuFqcwSGbz1EOh4pHO4iBzURQlA75yrug/c+ 0W4GcrsNMlowRZ3CDANXSmyxY9ARlrkWNMX8hIrdXoLJUmUBR0bbGcQzpyHF8Pn+oV5dlCVZyhYL GWNwVNbMDOKGS4oqE0qnIemNIN4QbkLJAJECZiAAfwjDJhe9RThWy8ytTM/1CJBVzc2/tKSIZxvE y90VSgQiRK8uI0OIMbfDAwlzmqeoCAXILrgs0eJ5at5qmN7O9ksPNhXEQXTMeVXabQ4N9jEubjt7 Rv8Q1QNnjQvtoCmZ5eq/0GPdAeNxvIUc3ohLMQB47prK/e/S5osOU9WReJT3RLKl8V7kuw6vXEuq KqNtVPZWSp71AnGMNSoasJk54VKsiMlrzNeMtaRFRCx16NzGTLYJW5vKNHTqdYwg4XUrS+VgcIvE 922yYQ37aXaLnGPpPnOUX7YcSW13p/IdHmMU9jQo39xMOJqdLNPZAGDdVjC5G412ywoxqFWNyzAj P0rTOvIHQs67X5IF6kiHWixh9/gWmC6QFM/BPgywBeNEXQJ2mJ5G6MgGskhQ3UZmyTRIJqjQg5Lq As4FSpso9FVA+lcdm59cytGFOYm2/NdY8GiBelif2XordhMTmUUHCfdanEnRzS1Gge0bigLCtdwp f+CEhIgSUFBnLFZUq+ScryK1I8gmgW186xekS4Uybthj+jsA6IrhCKyXNNyk/m5WUk7SxncrMFNT gqaYoShN4zVwc= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Fri, 18 Sep 2020 22:33:37 +0800 X-OQ-MSGID: <20200918143338.26104-2-quinkblack@foxmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918143338.26104-1-quinkblack@foxmail.com> References: <20200918143338.26104-1-quinkblack@foxmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] avformat/mov: fix typo in comments 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" From: Zhao Zhili --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 8c1243b48d..9fc0db24d5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1473,7 +1473,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c->fc, AV_LOG_TRACE, "time scale = %i\n", c->time_scale); c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */ - // set the AVCodecContext duration because the duration of individual tracks + // set the AVFormatContext duration because the duration of individual tracks // may be inaccurate if (c->time_scale > 0 && !c->trex_data) c->fc->duration = av_rescale(c->duration, AV_TIME_BASE, c->time_scale); From patchwork Fri Sep 18 14:33:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 22476 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 0796944AB94 for ; Fri, 18 Sep 2020 17:33:57 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D05C368B94A; Fri, 18 Sep 2020 17:33:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from qq.com (out203-205-221-245.mail.qq.com [203.205.221.245]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3389768B7DF for ; Fri, 18 Sep 2020 17:33:49 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1600439625; bh=ZIFYzkWBcqFZsBUA7pY2ODCz+UyASkC2PHTZZjsdz58=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K+jYNwtSyfziHIyE7Nf9Un8bHc91FW+rlw/1iHXVAluwMV32AU9DOYgXss5C3QPcI 4A6Knjl/ZwBlhcsiXds0Y3YfND9Yy6GbX2ApPnpIkdMlXAUYJD+f96vd2e2gNLwyWH meWB1vdpkOtEAmH97YbSi20acwCWhlD4s2pHMIXU= Received: from localhost.localdomain ([27.46.80.20]) by newxmesmtplogicsvrsza8.qq.com (NewEsmtp) with SMTP id 86834E91; Fri, 18 Sep 2020 22:33:40 +0800 X-QQ-mid: xmsmtpt1600439623t63lmikrj Message-ID: X-QQ-XMAILINFO: OcBT4SkMQhJm35pp740GYX9n+pn5Vy+7Wvg1eYtJFbuIsRyqO+Md2EfOW5xH/h gUJsXxM2cCSNHVfKn+RNVnCBZ4eiUqs8HLYPmNZOoSrm9w7hoEHZ4HXKrSbRBduHfKnaOUn9sVLf BpoTLObb4QSaidQdW5hXO5+2fAJhaRAXGTU+ZTyV/pbvBsW+dr/Zs8GMp15M9QJl4NNZmSmOhI8R canBjzhIflrJXJ6L4IxcqlzoFZd9+7iEBbw2AByylbufcpEqzLr9opws1A6mlCR3okXTJYQhZ4Bc AdF4fRvJmSuBWIw6wckTtg0qZ7PMxaCkSE69Bg9YBwyGh6rhuhvZwsBKjB2cLACnAblqzR3NUsH7 MQ90ZrG1EIJIDJQv8IymG4F61nsOOxc7Fq+SA2amQIMMK7Zzn3+zpOx5JH+eL1Xtgs6++rBgRNMf vbgkQ38n4mDRIrdojmK7oobKsUvi1QZFZDSGfkTJgDOI0SmCS6RjpMtEaJQJsB+wuWwpVlc88iRC U/wuYx+vT/WA664qjDp37pxCpx5b/2AWqZff0ucFlqmw0rwMizpR2H4tOyBRiEOzXitZ+RRAPf3r q5Md7wsw3SQi9UxalV3mhCpre7qyR+lqckKHpr+CWMJ0eeaiSxf5UBwJn2Eg1fU+wzzW3HoBc4tU 7DjT+K0TKTDex2gkRriCTVMvZ/HpIEprdrjvPFIkVKd7bqGli8cdslbi2c9EzmiSh1ATEQOxRbXa WDoSDWarYuIihRF0THwYD4VPWykKyQW1dS From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Fri, 18 Sep 2020 22:33:38 +0800 X-OQ-MSGID: <20200918143338.26104-3-quinkblack@foxmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918143338.26104-1-quinkblack@foxmail.com> References: <20200918143338.26104-1-quinkblack@foxmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] avformat/mov: remove an always true condition 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" From: Zhao Zhili --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 9fc0db24d5..f99605c2cd 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1475,7 +1475,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */ // set the AVFormatContext duration because the duration of individual tracks // may be inaccurate - if (c->time_scale > 0 && !c->trex_data) + if (!c->trex_data) c->fc->duration = av_rescale(c->duration, AV_TIME_BASE, c->time_scale); avio_rb32(pb); /* preferred scale */