[FFmpeg-cvslog] movenc-test: Add tests for negative cts offsets

Martin Storsjö git at videolan.org
Thu Sep 28 19:17:04 EEST 2017


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Sat Sep 23 18:44:45 2017 +0300| [5455a44aa5077bcd33485f424e055807afcefeb5] | committer: Michael Niedermayer

movenc-test: Add tests for negative cts offsets

Signed-off-by: Martin Storsjö <martin at martin.st>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5455a44aa5077bcd33485f424e055807afcefeb5
---

 libavformat/tests/movenc.c | 19 +++++++++++++++++++
 tests/ref/fate/movenc      | 11 +++++++++++
 2 files changed, 30 insertions(+)

diff --git a/libavformat/tests/movenc.c b/libavformat/tests/movenc.c
index 7a66395efd..8e59b74259 100644
--- a/libavformat/tests/movenc.c
+++ b/libavformat/tests/movenc.c
@@ -766,6 +766,25 @@ int main(int argc, char **argv)
     clear_duration = 0;
     do_interleave = 0;
 
+    // Write a fragmented file with b-frames and audio preroll,
+    // 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);
+    init(1, 1);
+    mux_gops(2);
+    finish();
+    close_out();
+
+    // Write a fragmented file with b-frames without audio preroll,
+    // 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);
+    init(1, 0);
+    mux_gops(2);
+    finish();
+    close_out();
 
     av_free(md5);
 
diff --git a/tests/ref/fate/movenc b/tests/ref/fate/movenc
index 47bcf9d515..872796ebce 100644
--- a/tests/ref/fate/movenc
+++ b/tests/ref/fate/movenc
@@ -140,3 +140,14 @@ write_data len 668, time 1566667, type sync atom moof
 write_data len 440, time 2233333, type boundary atom moof
 write_data len 262, time nopts, type trailer atom -
 edd19deae2b70afcf2cd744b89b7013d 4209 vfr-noduration-interleave
+write_data len 1231, time nopts, type header atom ftyp
+write_data len 916, time 0, type sync atom moof
+write_data len 908, time 1000000, type sync atom moof
+write_data len 148, time nopts, type trailer atom -
+781dbfd228f36903178e29faa727d78b 3203 delay-moov-elst-neg-cts
+write_data len 36, time nopts, type header atom ftyp
+write_data len 1123, time nopts, type header atom -
+write_data len 1188, time 0, type sync atom moof
+write_data len 908, time 1033333, type sync atom moof
+write_data len 148, time nopts, type trailer atom -
+7630fdf358e02c79e88f312f82a260b7 3403 empty-moov-neg-cts



More information about the ffmpeg-cvslog mailing list