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 B17034A7EF for ; Wed, 10 Apr 2024 07:48:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 22B7968D15D; Wed, 10 Apr 2024 10:47:59 +0300 (EEST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E861368C1E8 for ; Wed, 10 Apr 2024 10:47:52 +0300 (EEST) Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d485886545so112830561fa.2 for ; Wed, 10 Apr 2024 00:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1712735272; x=1713340072; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=f9sVlGgoTZAidK0EU5d3Kx85JQI0BpEBAklRTho4EZA=; b=axQvXmbahtvPdcV+6O0IWGIorl9d2aj1mCbeu/Xs0Uh47UX/+fm0qwmWeXB4Eu16+X XCN4tgRf8aem41j+idLWhlGUNSC/Rl4GZUjoPs/vv6JPXexCy+pcZw7yBO24YzosizYk Jwm6jh5ixVV1QRswpUCgmVqanQiHbXRJcZ7A80LUn1AGnDDFxxeTC88/EMn8OQs2XWou zE4UMHJZvXq5ItYkNNp9BZ0bupbe4gJQT2fu3l9r3XVx40CTXKOGVsXWD1NoCjrtu57n 26t/ojkbkqMZU36eWrJlxIJ1bXcBjdR7Bk2pUHbQd4GBCnLFXI1w2XaJ1SQCCJs7zETS 8LBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712735272; x=1713340072; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f9sVlGgoTZAidK0EU5d3Kx85JQI0BpEBAklRTho4EZA=; b=qV51rzie8wWwZamW/4GBn31MIDPOrVD5zRKx6RmTCK+h4++s9gBe+1ztHFIHImyXhs t/DT6wJ0kq9zpJmJj4YhpjPYVwi9vf0LfXgjxKxhj8Poseo48HhXVgjvbbntJZNWN34v i97cTXrIqpZR8hN+iCjph2s3Q7WgzadxZTmeE1+QDT0YgBlPyINf2r5oJQQhh9i0670X RGZjkwfNWJQTRok8kFA35mmJX8mwKKvc1O7Y7HuB+v8YG9tDXgC+9Z4rVpnU40GIVh5b WJPg9iYIl4PyabCBXpgaAxQ01ngfDmUI/exUxkWzS13BR4Jgd58J/kE6obFMSSFld0Ov 7TpA== X-Gm-Message-State: AOJu0YxqydV5Bqf7jiEQAsEZ7PMhLWqYs9EfHS3LT1CXfXPUkmmIylTf VvlOBxEyAwV+Q8yp5i83A/D5V8SAnAfTsgVhTUPw8hgKe4uBxJxri1P/FXTL8M0S8Mu3cPO+wv5 Yhg== X-Google-Smtp-Source: AGHT+IHDXDZ+oofmwTMHkH1qZGcmA1arsGFsHbB8fGwtoj4HGygpR/NnIw6LwIo2EcxIpSDMEcgcbQ== X-Received: by 2002:a2e:9782:0:b0:2d6:ba1e:a54a with SMTP id y2-20020a2e9782000000b002d6ba1ea54amr1661393lji.51.1712735272041; Wed, 10 Apr 2024 00:47:52 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id a26-20020a05651c211a00b002d8c66e401esm156022ljq.58.2024.04.10.00.47.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 00:47:51 -0700 (PDT) Date: Wed, 10 Apr 2024 10:47:50 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20240404102906.62843-1-martin@martin.st> Message-ID: <7bc0219e-16e5-76af-791c-56402a9f4571@martin.st> References: <20240404102906.62843-1-martin@martin.st> MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] tests/movenc: Validate that normal muxer usage doesn't print warnings 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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Thu, 4 Apr 2024, Martin Storsj=F6 wrote: > We have test to make sure that certain configurations do print > warnings. However, the normal operation of the muxer within this > test always printed a warning, so those tests to check for > extra warnings didn't essentially guard anything. > > The warning that always was printed, "track 1: codec frame size is > not set" was not present in the libav fork where this testcase > originated, it was removed in f234e8a32e6c69d7b63f8627f278be7c2c987f43. > > Set the frame size for the audio stream to silence the warning, > and use this frame size in a couple later calculations, and check > that one test configuration doesn't print warnings. > > Setting the frame size apparently changes the rounding of a timestamp > in the ismv muxing testcase. > --- > libavformat/tests/movenc.c | 10 ++++++++-- > tests/ref/fate/movenc | 2 +- > 2 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/libavformat/tests/movenc.c b/libavformat/tests/movenc.c > index 77f73abdfa..12a3632d4e 100644 > --- a/libavformat/tests/movenc.c > +++ b/libavformat/tests/movenc.c > @@ -215,6 +215,7 @@ static void init_fps(int bf, int audio_preroll, int f= ps) > st->codecpar->codec_type =3D AVMEDIA_TYPE_AUDIO; > st->codecpar->codec_id =3D AV_CODEC_ID_AAC; > st->codecpar->sample_rate =3D 44100; > + st->codecpar->frame_size =3D 1024; > st->codecpar->ch_layout =3D (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; > st->time_base.num =3D 1; > st->time_base.den =3D 44100; > @@ -232,9 +233,10 @@ static void init_fps(int bf, int audio_preroll, int = fps) > frames =3D 0; > gop_size =3D 30; > duration =3D video_st->time_base.den / fps; > - audio_duration =3D 1024LL * audio_st->time_base.den / audio_st->code= cpar->sample_rate; > + audio_duration =3D (long long)audio_st->codecpar->frame_size * > + audio_st->time_base.den / audio_st->codecpar->sampl= e_rate; > if (audio_preroll) > - audio_preroll =3D 2048LL * audio_st->time_base.den / audio_st->c= odecpar->sample_rate; > + audio_preroll =3D 2 * audio_duration; > > bframes =3D bf; > video_dts =3D bframes ? -duration : 0; > @@ -442,6 +444,7 @@ int main(int argc, char **argv) > // Similar to the previous one, but with input that doesn't start at > // pts/dts 0. avoid_negative_ts behaves in the same way as > // in non-empty-moov-no-elst above. > + init_count_warnings(); > init_out("empty-moov-no-elst"); > av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov", 0); > init(1, 0); > @@ -449,6 +452,9 @@ int main(int argc, char **argv) > finish(); > close_out(); > > + reset_count_warnings(); > + check(num_warnings =3D=3D 0, "Unexpected warnings printed"); > + > // Same as the previous one, but disable avoid_negative_ts (which > // would require using an edit list, but with empty_moov, one can't > // write a sensible edit list, when the start timestamps aren't known= ). > diff --git a/tests/ref/fate/movenc b/tests/ref/fate/movenc > index 968a3d27f2..0c77f5187c 100644 > --- a/tests/ref/fate/movenc > +++ b/tests/ref/fate/movenc > @@ -20,7 +20,7 @@ write_data len 828, time nopts, type unknown atom - > write_data len 728, time 999999, type sync atom moof > write_data len 812, time nopts, type unknown atom - > write_data len 148, time nopts, type trailer atom - > -92ce825ff40505ec8676191705adb7e7 4439 ismv > +d2df24d323f4a8896441cd91203ac5f8 4439 ismv > write_data len 36, time nopts, type header atom ftyp > write_data len 1123, time nopts, type header atom - > write_data len 796, time 0, type sync atom moof > -- = > 2.39.3 (Apple Git-146) Will push within a few days if there are no objections. // Martin _______________________________________________ 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".