[vlc-commits] test: timestamps_filter: add SPU offset check after discontinuity

Francois Cartegnie git at videolan.org
Mon Jan 27 22:56:18 CET 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan 24 15:06:38 2020 +0100| [b29ac17cdb6ac7f50a01374468847142893b3d71] | committer: Francois Cartegnie

test: timestamps_filter: add SPU offset check after discontinuity

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b29ac17cdb6ac7f50a01374468847142893b3d71
---

 test/modules/demux/timestamps_filter.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/test/modules/demux/timestamps_filter.c b/test/modules/demux/timestamps_filter.c
index cfeb2eb0f4..e183938aae 100644
--- a/test/modules/demux/timestamps_filter.c
+++ b/test/modules/demux/timestamps_filter.c
@@ -190,6 +190,23 @@ int main(void)
     assert(es_out_Control(out, ES_OUT_TF_FILTER_GET_TIME, &i_pcrtime) == VLC_SUCCESS);
     assert(i_pcrtime == TIMELINE_0 +600);
 
+    es_format_Init(&fmt, SPU_ES, VLC_FOURCC('S','P','U','0'));
+    fmt.i_id = 2;
+    assert(es_out_Add(out, &fmt) == ESID(2));
+    p_block->i_dts = TIMELINE_1 + 100;
+    es_out_Send(out, ESID(2), p_block);
+    assert(p_block->i_dts == TIMELINE_0 + 700);
+
+    es_out_SetPCR(out, TIMELINE_2 +0);
+    assert(es_out_Control(out, ES_OUT_TF_FILTER_GET_TIME, &i_pcrtime) == VLC_SUCCESS);
+    assert(i_pcrtime == TIMELINE_0 +700);
+    p_block->i_dts = TIMELINE_2 + 300;
+    es_out_Send(out, ESID(2), p_block);
+    assert(p_block->i_dts == TIMELINE_0 + 1000);
+    p_block->i_dts = TIMELINE_2 + 5300;
+    es_out_Send(out, ESID(2), p_block);
+    assert(p_block->i_dts == TIMELINE_0 + 6000);
+
     block_Release(p_block);
     es_out_Delete(out);
     return 0;



More information about the vlc-commits mailing list