Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Marton Balint <cus@passwd.hu>
To: ffmpeg-devel@ffmpeg.org
Cc: Marton Balint <cus@passwd.hu>
Subject: [FFmpeg-devel] [PATCH 5/6] tests: do not override movflags defaults
Date: Sun, 16 Apr 2023 00:05:57 +0200
Message-ID: <20230415220558.16122-5-cus@passwd.hu> (raw)
In-Reply-To: <20230415220558.16122-1-cus@passwd.hu>

It does not matter if the default is 0, but still it is cleaner that way.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavformat/tests/movenc.c | 54 +++++++++++++++++++-------------------
 tests/fate/subtitles.mak   |  2 +-
 tests/fate/vcodec.mak      |  2 +-
 3 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/libavformat/tests/movenc.c b/libavformat/tests/movenc.c
index 6f9d381927..fca3213285 100644
--- a/libavformat/tests/movenc.c
+++ b/libavformat/tests/movenc.c
@@ -389,7 +389,7 @@ int main(int argc, char **argv)
     // samples. One moov+mdat with 1 second of data and one moof+mdat with 1
     // second of data.
     init_out("non-empty-moov");
-    av_dict_set(&opts, "movflags", "frag_keyframe", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe", 0);
     init(0, 0);
     mux_gops(2);
     finish();
@@ -398,7 +398,7 @@ int main(int argc, char **argv)
     // Write a similar file, but with B-frames and audio preroll, handled
     // via an edit list.
     init_out("non-empty-moov-elst");
-    av_dict_set(&opts, "movflags", "frag_keyframe", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe", 0);
     av_dict_set(&opts, "use_editlist", "1", 0);
     init(1, 1);
     mux_gops(2);
@@ -410,7 +410,7 @@ int main(int argc, char **argv)
     // of the first audio packet is > 0, but it is set to zero since edit
     // lists aren't used, increasing the duration of the first packet instead.
     init_out("non-empty-moov-no-elst");
-    av_dict_set(&opts, "movflags", "frag_keyframe", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe", 0);
     av_dict_set(&opts, "use_editlist", "0", 0);
     init(1, 0);
     mux_gops(2);
@@ -420,7 +420,7 @@ int main(int argc, char **argv)
     format = "ismv";
     // Write an ISMV, with B-frames and audio preroll.
     init_out("ismv");
-    av_dict_set(&opts, "movflags", "frag_keyframe", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe", 0);
     init(1, 1);
     mux_gops(2);
     finish();
@@ -430,7 +430,7 @@ int main(int argc, char **argv)
     // An initial moov that doesn't contain any samples, followed by two
     // moof+mdat pairs.
     init_out("empty-moov");
-    av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov", 0);
     av_dict_set(&opts, "use_editlist", "0", 0);
     init(0, 0);
     mux_gops(2);
@@ -442,7 +442,7 @@ int main(int argc, char **argv)
     // pts/dts 0. avoid_negative_ts behaves in the same way as
     // in non-empty-moov-no-elst above.
     init_out("empty-moov-no-elst");
-    av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov", 0);
     init(1, 0);
     mux_gops(2);
     finish();
@@ -454,7 +454,7 @@ int main(int argc, char **argv)
     // This should trigger a warning - we check that the warning is produced.
     init_count_warnings();
     init_out("empty-moov-no-elst-no-adjust");
-    av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov", 0);
     av_dict_set(&opts, "avoid_negative_ts", "disabled", 0);
     init(1, 0);
     mux_gops(2);
@@ -467,7 +467,7 @@ int main(int argc, char **argv)
     // Verify that delay_moov produces the same as empty_moov for
     // simple input
     init_out("delay-moov");
-    av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0);
     av_dict_set(&opts, "use_editlist", "0", 0);
     init(0, 0);
     mux_gops(2);
@@ -477,7 +477,7 @@ int main(int argc, char **argv)
 
     // Test writing content that requires an edit list using delay_moov
     init_out("delay-moov-elst");
-    av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0);
     init(1, 1);
     mux_gops(2);
     finish();
@@ -486,7 +486,7 @@ int main(int argc, char **argv)
     // Test writing a file with one track lacking packets, with delay_moov.
     skip_write_audio = 1;
     init_out("delay-moov-empty-track");
-    av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0);
     init(0, 0);
     mux_gops(2);
     // The automatic flushing shouldn't output anything, since we're still
@@ -501,7 +501,7 @@ int main(int argc, char **argv)
     // Check that manually flushing still outputs things as expected. This
     // produces two fragments, while the one above produces only one.
     init_out("delay-moov-empty-track-flush");
-    av_dict_set(&opts, "movflags", "frag_custom+delay_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+delay_moov", 0);
     init(0, 0);
     mux_gops(1);
     av_write_frame(ctx, NULL); // Force writing the moov
@@ -519,7 +519,7 @@ int main(int argc, char **argv)
     // Verify that the header written by delay_moov when manually flushed
     // is identical to the one by empty_moov.
     init_out("empty-moov-header");
-    av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov", 0);
     av_dict_set(&opts, "use_editlist", "0", 0);
     init(0, 0);
     close_out();
@@ -542,7 +542,7 @@ int main(int argc, char **argv)
     finish();
 
     init_out("delay-moov-header");
-    av_dict_set(&opts, "movflags", "frag_custom+delay_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+delay_moov", 0);
     av_dict_set(&opts, "use_editlist", "0", 0);
     init(0, 0);
     check(out_size == 0, "Output written during init with delay_moov");
@@ -563,7 +563,7 @@ int main(int argc, char **argv)
     // Verify that we can produce an identical second fragment without
     // writing the first one. First write the reference fragments that
     // we want to reproduce.
-    av_dict_set(&opts, "movflags", "frag_custom+empty_moov+dash", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+empty_moov+dash", 0);
     init(0, 0);
     mux_gops(1);
     av_write_frame(ctx, NULL); // Output the first fragment
@@ -576,7 +576,7 @@ int main(int argc, char **argv)
 
     // Produce the same second fragment without actually writing the first
     // one before.
-    av_dict_set(&opts, "movflags", "frag_custom+empty_moov+dash+frag_discont", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+empty_moov+dash+frag_discont", 0);
     av_dict_set(&opts, "fragment_index", "2", 0);
     av_dict_set(&opts, "avoid_negative_ts", "disabled", 0);
     av_dict_set(&opts, "use_editlist", "0", 0);
@@ -591,7 +591,7 @@ int main(int argc, char **argv)
 
     // Produce the same thing by using delay_moov, which requires a slightly
     // different call sequence.
-    av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash+frag_discont", 0);
     av_dict_set(&opts, "fragment_index", "2", 0);
     init(0, 0);
     skip_gops(1);
@@ -607,7 +607,7 @@ int main(int argc, char **argv)
     // Test discontinuously written fragments with B-frames (where the
     // assumption of starting at pts=0 works) but not with audio preroll
     // (which can't be guessed).
-    av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash", 0);
     init(1, 0);
     mux_gops(1);
     init_out("delay-moov-elst-init");
@@ -622,7 +622,7 @@ int main(int argc, char **argv)
     memcpy(content, hash, HASH_SIZE);
     finish();
 
-    av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash+frag_discont", 0);
     av_dict_set(&opts, "fragment_index", "2", 0);
     init(1, 0);
     skip_gops(1);
@@ -640,7 +640,7 @@ int main(int argc, char **argv)
 
     // Test discontinuously written fragments with B-frames and audio preroll,
     // properly signaled.
-    av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash", 0);
     init(1, 1);
     mux_gops(1);
     init_out("delay-moov-elst-signal-init");
@@ -655,7 +655,7 @@ int main(int argc, char **argv)
     memcpy(content, hash, HASH_SIZE);
     finish();
 
-    av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash+frag_discont", 0);
     av_dict_set(&opts, "fragment_index", "2", 0);
     init(1, 1);
     signal_init_ts();
@@ -673,7 +673,7 @@ int main(int argc, char **argv)
 
 
     // Test muxing discontinuous fragments with very large (> (1<<31)) timestamps.
-    av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash+frag_discont", 0);
+    av_dict_set(&opts, "movflags", "+frag_custom+delay_moov+dash+frag_discont", 0);
     av_dict_set(&opts, "fragment_index", "2", 0);
     init(1, 1);
     signal_init_ts();
@@ -700,7 +700,7 @@ int main(int argc, char **argv)
     // match - the input stream starts at pts=-2048, but that part is excluded
     // by the edit list.
     init_out("vfr");
-    av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov+dash", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov+dash", 0);
     init_fps(1, 1, 3);
     mux_frames(gop_size/2, 0);
     duration /= 10;
@@ -719,7 +719,7 @@ int main(int argc, char **argv)
     init_count_warnings();
     clear_duration = 1;
     init_out("vfr-noduration");
-    av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov+dash", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov+dash", 0);
     init_fps(1, 1, 3);
     mux_frames(gop_size/2, 0);
     duration /= 10;
@@ -735,7 +735,7 @@ int main(int argc, char **argv)
     // this will cause write_data_type to be called with the type unknown.
     force_iobuf_size = 1500;
     init_out("large_frag");
-    av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0);
     init_fps(1, 1, 3);
     mux_gops(2);
     finish();
@@ -748,7 +748,7 @@ int main(int argc, char **argv)
     // the expected, but we simulate dropped frames at one point.
     do_interleave = 1;
     init_out("vfr-noduration-interleave");
-    av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov", 0);
     av_dict_set(&opts, "frag_duration", "650000", 0);
     init_fps(1, 1, 30);
     mux_frames(gop_size/2, 0);
@@ -771,7 +771,7 @@ int main(int argc, char **argv)
     // with negative cts values, removing the edit list for the
     // video track.
     init_out("delay-moov-elst-neg-cts");
-    av_dict_set(&opts, "movflags", "frag_keyframe+delay_moov+negative_cts_offsets", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+delay_moov+negative_cts_offsets", 0);
     init(1, 1);
     mux_gops(2);
     finish();
@@ -781,7 +781,7 @@ int main(int argc, char **argv)
     // with negative cts values, avoiding any edit lists, allowing
     // to use empty_moov instead of delay_moov.
     init_out("empty-moov-neg-cts");
-    av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov+negative_cts_offsets", 0);
+    av_dict_set(&opts, "movflags", "+frag_keyframe+empty_moov+negative_cts_offsets", 0);
     init(1, 0);
     mux_gops(2);
     finish();
diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak
index e6684a814b..59595b9cc1 100644
--- a/tests/fate/subtitles.mak
+++ b/tests/fate/subtitles.mak
@@ -39,7 +39,7 @@ FATE_SUBTITLES_ASS-$(call DEMDEC, MOV, MOVTEXT) += fate-sub-movtext
 fate-sub-movtext: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4
 
 FATE_SUBTITLES-$(call ENCDEC, MOVTEXT, MOV) += fate-binsub-movtextenc
-fate-binsub-movtextenc: CMD = md5 -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4 -map 0 -scodec mov_text -f mp4 -flags +bitexact -fflags +bitexact -movflags frag_keyframe+empty_moov
+fate-binsub-movtextenc: CMD = md5 -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4 -map 0 -scodec mov_text -f mp4 -flags +bitexact -fflags +bitexact -movflags +frag_keyframe+empty_moov
 
 FATE_SUBTITLES_ASS-$(call DEMDEC, MPL2, MPL2) += fate-sub-mpl2
 fate-sub-mpl2: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MPL2_capability_tester.txt
diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
index bf9de0327a..fbee264a9d 100644
--- a/tests/fate/vcodec.mak
+++ b/tests/fate/vcodec.mak
@@ -111,7 +111,7 @@ fate-vsynth%-dnxhd-1080i-10bit:  ENCOPTS = -s hd1080 -b 185M -flags +ildct \
                                            -pix_fmt yuv422p10 -frames 5 -qmax 8
 fate-vsynth%-dnxhd-1080i-10bit:  DECOPTS = -sws_flags area+accurate_rnd+bitexact
 
-fate-vsynth%-dnxhd-1080i-colr:   ENCOPTS = -s hd1080 -b 120M -flags +ildct -movflags write_colr \
+fate-vsynth%-dnxhd-1080i-colr:   ENCOPTS = -s hd1080 -b 120M -flags +ildct -movflags +write_colr \
                                            -pix_fmt yuv422p -frames 5 -qmax 8
 fate-vsynth%-dnxhd-1080i-colr:   DECOPTS = -sws_flags area+accurate_rnd+bitexact
 
-- 
2.35.3

_______________________________________________
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".

  parent reply	other threads:[~2023-04-15 22:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15 22:05 [FFmpeg-devel] [PATCH 1/6] avformat/mov: factorize reading creation time metadata Marton Balint
2023-04-15 22:05 ` [FFmpeg-devel] [PATCH 2/6] avformat/mov: restrict unix timestamp hack to version 0 mdhd/mvhd Marton Balint
2023-04-15 22:05 ` [FFmpeg-devel] [PATCH 3/6] avformat/movenc: factorize determining mdhd/mvhd/tkhd version Marton Balint
2023-04-15 22:05 ` [FFmpeg-devel] [PATCH 4/6] avformat/smoothstreamingenc: do not override movflag defaults Marton Balint
2023-04-15 22:05 ` Marton Balint [this message]
2023-04-15 22:05 ` [FFmpeg-devel] [PATCH 6/6] doc/muxers: reorder and cleanup mov muxer options Marton Balint
2023-04-23 18:46 ` [FFmpeg-devel] [PATCH 1/6] avformat/mov: factorize reading creation time metadata Marton Balint

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230415220558.16122-5-cus@passwd.hu \
    --to=cus@passwd.hu \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git