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 4B94A40E76 for ; Fri, 11 Mar 2022 13:59:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C41BA68B0FD; Fri, 11 Mar 2022 15:59:05 +0200 (EET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B0CB8688166 for ; Fri, 11 Mar 2022 15:58:59 +0200 (EET) Received: by mail-pj1-f54.google.com with SMTP id e3so8075372pjm.5 for ; Fri, 11 Mar 2022 05:58:59 -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=AVAXOZa8IAJVVYGOiLbNkkmQ8vN2R+WD942eSsu4Vz0=; b=mURTH2xw/eANPf9ZkxlZqest9edhYOOeV0i8SOlPls9o9nBE9nZseDuw8zAlRS0h4x r9Szk+ZkxTe7a8tmYK/QQw+JADcFUMlVXv1HHbKLeoRGSNV4KChn6NX7mKW32Y4No1EW QFAj/mdfc5MwdKjJWivflvc/WggAn/2ta1W+6ESsYcsiqM3YmLEXwVq5vDqNReCxhvQm 3d3IvQGp38/MrZB4E7rn1H9TCgphOq2z9GE3S1wFIWajtF9wBQRgpwz/lKDfaopLNjA3 iiPNeqasq/sp5V/fUYCeM2xrK0t74u7W4EWARu+3i0gK+apOt9kW4ZNrf4r2ckhX9GJb rtPw== 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=AVAXOZa8IAJVVYGOiLbNkkmQ8vN2R+WD942eSsu4Vz0=; b=vRhOPtXTysm+bkpwEJ6j3iWLH8HqxZHJcXs2gtTQtG5ZwK8+TMB6zK/+jAtGNwoaEg ZQNRLUVFC3lEuKYQImPTiVX1m+q/+gqOpXFDx8U+ReB7ZFMnspUuLLFeg2GWJ9FiVmPn XUehfMGInp9e5YztSbK/rTv99DQBW5OmnQHJqVn8lk8auo0aohXzLpPO7BGXp4L3hcMJ h0x43u6w5CNB5vPrCZL4Gf+/qE7oAYXm9734pJt3RP3pzD1xVgU0uDz9jnXvPtSYFtDD Kt8ncBfZboQIfOmwzLuQjM1sk3SpOIVqbvM5KAmJmqxN+tqCZ51i63wptP61YokqeCA/ 3Y0w== X-Gm-Message-State: AOAM531lX75pvvCTVYUHsus+qJoY5hgc5W5v3xc/GT7ia4xXyzeldWpk lBnt1xx6PdV2vNRSq2GiwPTHY5m+TkQyFg== X-Google-Smtp-Source: ABdhPJz6Whn2x9xRkpUamCet6YhnhxLyy8iZqhAa8OUoTJjAyzzIUV+1LlfDloLF+M424GX84CDChA== X-Received: by 2002:a17:902:7086:b0:14f:ee29:5ef0 with SMTP id z6-20020a170902708600b0014fee295ef0mr10303850plk.142.1647007137719; Fri, 11 Mar 2022 05:58:57 -0800 (PST) Received: from gmail.com ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id q21-20020a63e215000000b00373efe2cbcbsm8733706pgh.80.2022.03.11.05.58.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Mar 2022 05:58:57 -0800 (PST) Date: Fri, 11 Mar 2022 21:58:54 +0800 From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Message-ID: <20220311135854.GA24038@gmail.com> Mail-Followup-To: ffmpeg-devel@ffmpeg.org References: <1646229512-12103-1-git-send-email-lance.lmwang@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1646229512-12103-1-git-send-email-lance.lmwang@gmail.com> 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 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. -- 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".