From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 22FDE40E9C for ; Fri, 11 Mar 2022 15:59:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9DDF068AEC1; Fri, 11 Mar 2022 17:59:02 +0200 (EET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A04E680593 for ; Fri, 11 Mar 2022 17:58:56 +0200 (EET) Received: by mail-pf1-f170.google.com with SMTP id f8so8184673pfj.5 for ; Fri, 11 Mar 2022 07:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=Mk+o+j91y8cBvrwcDmmwc9wkAWRsJT84zg3QiWQd7M8=; b=goj990FrdoaN2BqL50FAYWLxlYIImN7LwJF0eNFCukmAKJFF4YKtVgbMWM5NXK8U6g saFPS5PWb7lrj+zeAAe2Mqx0al0XVI76vxfyTSar1eGYWDbdfuKdhat1R5BBg68K3S6k Iff8ED8H8m0d3FJrPJl9/PBmQinqL25SQqVb8KLBW0GB23EvW+MVumk4vrZb3MPv4iWF Z/SZotNKzkhk7nX8fykTNlS7aezp9H+DFIRUXSiGkK1pi0LY5ITepxA9ogqa4b/uCidK tcGEe8Yg9UB88Sv84A4q/lrIWfYkTUAzZbvPD5FbX4RHqsKrGColnliZcyLdCBHF3r8N UaeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=Mk+o+j91y8cBvrwcDmmwc9wkAWRsJT84zg3QiWQd7M8=; b=RI7B2rlhQpZNsAWtiGOcTA/k7xWw4lJxGCQTCoq1N3nNGC92cF5ka/hNTv+eCQWimq sOgQh0QdwLY6Csv3/UlWSihDIMld/wWs3nSPG0q+AA/uUr7tD4fyXkjGGVYNvruyXMBm TvrCBVWHX1uFTpH2Glxgq8Neb5+4gYcyoVKZHo0vMsA/4C74s/6enXDP2agKVFmeFe7P OC0SWeUM1TVaIZ7YIZXjLSCd0DNM6issCkos+Pd/taFUFBjTmhXj6EOgzQyCIxFjed+g ch4O0HN6o+jlWXcTLVU+yiAf25W/aPxWb3XafcB9eXnaEFj1P0buUlgXseLaNbZNvX1d lQrg== X-Gm-Message-State: AOAM530PwKQ7NvB1zGkgJo8LWWYyYnGkVstQSCizqriTCCbR8g7P/fw4 1bwuPMim+bYvDp7axvjyBMK3yzSPsi2i+Q== X-Google-Smtp-Source: ABdhPJzi40mcx4gXxpVWjPU1I8BbTMN37rP3IRboPRv67iBHH1jp4UUPOFwyr+uWtkWVKfDGG1NlmA== X-Received: by 2002:aa7:81ca:0:b0:4f6:d297:4213 with SMTP id c10-20020aa781ca000000b004f6d2974213mr10980942pfn.59.1647014334561; Fri, 11 Mar 2022 07:58:54 -0800 (PST) Received: from gmail.com ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id l20-20020a056a00141400b004f65cedfb09sm11021475pfu.48.2022.03.11.07.58.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Mar 2022 07:58:54 -0800 (PST) Date: Fri, 11 Mar 2022 23:58:51 +0800 From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Message-ID: <20220311155851.GA9443@gmail.com> Mail-Followup-To: ffmpeg-devel@ffmpeg.org References: <1646229512-12103-1-git-send-email-lance.lmwang@gmail.com> <20220311135854.GA24038@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/movenc: initialize pts/dts/duration of timecode packet X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, Mar 11, 2022 at 03:04:32PM +0100, Andreas Rheinhardt wrote: > lance.lmwang@gmail.com: > > On Wed, Mar 02, 2022 at 09:58:31PM +0800, lance.lmwang@gmail.com wrote: > >> From: Limin Wang > >> > >> Fix below error message when timecode packet is written. > >> "Application provided duration: -9223372036854775808 / timestamp: -9223372036854775808 is out of range for mov/mp4 format" > >> > >> try to reproduce by: > >> ffmpeg -y -f lavfi -i color -metadata "timecode=00:00:00:00" -t 1 test.mov > >> > >> Note although error message is printed, the timecode packet will be written anyway. So > >> the patch 2/2 will try to change the log level to warning. > >> > >> The first two test case of fate-lavf-ismv have timecode setting, so the crc of ref data is different. > >> Fixes ticket #9488 > >> > >> Signed-off-by: Limin Wang > >> --- > >> libavformat/movenc.c | 2 ++ > >> tests/ref/lavf/ismv | 4 ++-- > >> 2 files changed, 4 insertions(+), 2 deletions(-) > >> > >> diff --git a/libavformat/movenc.c b/libavformat/movenc.c > >> index 4c86891..74b94cd 100644 > >> --- a/libavformat/movenc.c > >> +++ b/libavformat/movenc.c > >> @@ -6383,6 +6383,8 @@ static int mov_create_timecode_track(AVFormatContext *s, int index, int src_inde > >> pkt->data = data; > >> pkt->stream_index = index; > >> pkt->flags = AV_PKT_FLAG_KEY; > >> + pkt->pts = pkt->dts = av_rescale_q(tc.start, av_inv_q(rate), (AVRational){1,mov->movie_timescale}); > >> + pkt->duration = av_rescale_q(1, av_inv_q(rate), (AVRational){1,mov->movie_timescale}); > >> pkt->size = 4; > >> AV_WB32(pkt->data, tc.start); > >> ret = ff_mov_write_packet(s, pkt); > >> diff --git a/tests/ref/lavf/ismv b/tests/ref/lavf/ismv > >> index ac7f72b..723b432 100644 > >> --- a/tests/ref/lavf/ismv > >> +++ b/tests/ref/lavf/ismv > >> @@ -1,7 +1,7 @@ > >> -48fb8d7a5d19bd60f3a49ccf4b7d6593 *tests/data/lavf/lavf.ismv > >> +7a24b73c096ec0f13f0f7a2d9101c4c1 *tests/data/lavf/lavf.ismv > >> 313169 tests/data/lavf/lavf.ismv > >> tests/data/lavf/lavf.ismv CRC=0x9d9a638a > >> -d19cd8e310a2e94fe0a0d11c5dc29217 *tests/data/lavf/lavf.ismv > >> +79646383fd099d45ad0d0c2791c601dd *tests/data/lavf/lavf.ismv > >> 322075 tests/data/lavf/lavf.ismv > >> tests/data/lavf/lavf.ismv CRC=0xe8130120 > >> 3b6023766845b51b075aed474c00f73c *tests/data/lavf/lavf.ismv > >> -- > >> 1.8.3.1 > >> > > > > will apply the patch set tomorrow unless there are any objections. > > > > You have not really answered whether the current files or the new files > are spec-incompliant; you have just reported that one byte is different. Sorry, I think I have said both current and new file is spec-compliant in the last email. By Quicktime file format specs: Section Timecode Sample Description, all tmcd field isn't used pts/dts. As for where is the different for one byte, it's caused by pkt->duration. The old is 0(uninitialized), after the patch it's 33(1 frame duration). > > - Andreas > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". -- Thanks, Limin Wang _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".