api: Set fakesink to be sync

Otherwise seeking will not be possible when this sink is used
This commit is contained in:
Rafał Dzięgiel
2021-09-03 20:32:17 +02:00
parent 70942ba419
commit cd479f3bb4

View File

@@ -3162,12 +3162,14 @@ gst_clapper_main (gpointer data)
g_warning ("GstClapper: pipewiresink element not available"); g_warning ("GstClapper: pipewiresink element not available");
fakesink = gst_element_factory_make ("fakesink", "fakeaudiosink"); fakesink = gst_element_factory_make ("fakesink", "fakeaudiosink");
if (fakesink) if (fakesink) {
g_object_set (fakesink, "sync", TRUE, NULL);
g_object_set (self->playbin, "audio-sink", fakesink, NULL); g_object_set (self->playbin, "audio-sink", fakesink, NULL);
else } else {
g_warning ("GstClapper: default audio sink will be used instead"); g_warning ("GstClapper: default audio sink will be used instead");
} }
} }
}
scaletempo = gst_element_factory_make ("scaletempo", NULL); scaletempo = gst_element_factory_make ("scaletempo", NULL);
if (scaletempo) { if (scaletempo) {