mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
mxfdemux-structure: Sync fakesink state with the bin to make the application work at all
This commit is contained in:
parent
f11a3ccf9d
commit
5c8ebb4ada
1 changed files with 5 additions and 1 deletions
|
@ -182,6 +182,7 @@ on_pad_added (GstElement * src, GstPad * pad, gpointer data)
|
|||
GstElement *bin = (GstElement *) gst_element_get_parent (src);
|
||||
|
||||
gst_bin_add (GST_BIN (bin), fakesink);
|
||||
gst_element_sync_state_with_parent (fakesink);
|
||||
|
||||
gst_pad_link (pad, sinkpad);
|
||||
|
||||
|
@ -244,7 +245,10 @@ main (int argc, char **argv)
|
|||
gtk_container_add (GTK_CONTAINER (window), scrolled_window);
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
if (gst_element_set_state (pipeline,
|
||||
GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
|
||||
g_error ("Failed to change state to PLAYING");
|
||||
}
|
||||
|
||||
gtk_main ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue