diff options
author | Pierre-Anthony Lemieux <pal@palemieux.com> | 2022-10-02 09:27:54 -0700 |
---|---|---|
committer | Zane van Iperen <zane@zanevaniperen.com> | 2022-11-03 21:16:10 +1000 |
commit | 906219e3ca2cee4ada28753e57f946a3057dc105 (patch) | |
tree | 207f0b4b8e9656af0bf09c929d12286082227b5e | |
parent | 94922f6caba8f1739d4aa0517d8df6e93cf19b8a (diff) | |
download | ffmpeg-906219e3ca2cee4ada28753e57f946a3057dc105.tar.gz |
avformat/tests/imf: add CPL timecode test
-rw-r--r-- | libavformat/tests/imf.c | 7 | ||||
-rw-r--r-- | tests/ref/fate/imf | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/tests/imf.c b/libavformat/tests/imf.c index a71de692f9..2cacb43f47 100644 --- a/libavformat/tests/imf.c +++ b/libavformat/tests/imf.c @@ -70,6 +70,11 @@ const char *cpl_doc = " <Id>urn:uuid:8e097bb0-cff7-4969-a692-bad47bfb528f</Id>" " </EssenceDescriptor>" "</EssenceDescriptorList>" + "<CompositionTimecode>" + "<TimecodeDropFrame>false</TimecodeDropFrame>" + "<TimecodeRate>24</TimecodeRate>" + "<TimecodeStartAddress>02:10:01.23</TimecodeStartAddress>" + "</CompositionTimecode>" "<EditRate>24000 1001</EditRate>" "<SegmentList>" "<Segment>" @@ -288,6 +293,7 @@ static int test_cpl_parsing(void) { xmlDocPtr doc; FFIMFCPL *cpl; + char tc_buf[AV_TIMECODE_STR_SIZE]; int ret; doc = xmlReadMemory(cpl_doc, strlen(cpl_doc), NULL, NULL, 0); @@ -306,6 +312,7 @@ static int test_cpl_parsing(void) printf("%s\n", cpl->content_title_utf8); printf(AV_PRI_URN_UUID "\n", AV_UUID_ARG(cpl->id_uuid)); printf("%i %i\n", cpl->edit_rate.num, cpl->edit_rate.den); + printf("%s\n", av_timecode_make_string(cpl->tc, tc_buf, 0)); printf("Marker resource count: %" PRIu32 "\n", cpl->main_markers_track->resource_count); for (uint32_t i = 0; i < cpl->main_markers_track->resource_count; i++) { diff --git a/tests/ref/fate/imf b/tests/ref/fate/imf index 90b461dc5d..5093167bc7 100644 --- a/tests/ref/fate/imf +++ b/tests/ref/fate/imf @@ -1,6 +1,7 @@ FFMPEG sample content urn:uuid:8713c020-2489-45f5-a9f7-87be539e20b5 24000 1001 +02:10:01:23 Marker resource count: 2 Marker resource 0 Marker 0 |