diff --git a/subprojects/gst-plugins-base/tests/check/gst/typefindfunctions.c b/subprojects/gst-plugins-base/tests/check/gst/typefindfunctions.c index 0bdef0c07d..9c47bb4436 100644 --- a/subprojects/gst-plugins-base/tests/check/gst/typefindfunctions.c +++ b/subprojects/gst-plugins-base/tests/check/gst/typefindfunctions.c @@ -508,6 +508,19 @@ GST_START_TEST (test_webvtt) GST_END_TEST; +GST_START_TEST (test_subparse) +{ + const gchar *type; + GstCaps *caps = NULL; + + caps = typefind_test_file ("subrip.srt"); + type = gst_structure_get_name (gst_caps_get_structure (caps, 0)); + fail_unless_equals_string (type, "application/x-subtitle"); + gst_caps_unref (caps); +} + +GST_END_TEST; + static Suite * typefindfunctions_suite (void) { @@ -526,6 +539,7 @@ typefindfunctions_suite (void) tcase_add_test (tc_chain, test_hls_m3u8); tcase_add_test (tc_chain, test_manifest_typefinding); tcase_add_test (tc_chain, test_webvtt); + tcase_add_test (tc_chain, test_subparse); return s; } diff --git a/subprojects/gst-plugins-base/tests/files/subrip.srt b/subprojects/gst-plugins-base/tests/files/subrip.srt new file mode 100644 index 0000000000..ffeeb9b3ea --- /dev/null +++ b/subprojects/gst-plugins-base/tests/files/subrip.srt @@ -0,0 +1,16 @@ +1 +00:00:01,000 --> 00:00:02,000 +One + +2 +00:00:02,000 --> 00:00:03,000 +Two + +3 +00:00:03,000 --> 00:00:04,000 +Three + +4 +00:00:04,000 --> 00:00:05,000 +Four +