playbin: check the flags before set again
authoreunhae choi <eunhae1.choi@samsung.com>
Mon, 18 May 2015 06:45:01 +0000 (15:45 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 18 May 2015 07:01:04 +0000 (10:01 +0300)
check the previous flags of playsink to avoid the reconfigure of playsink repeatedly

https://bugzilla.gnome.org/show_bug.cgi?id=749528

gst/playback/gstplaybin2.c

index 0185290..a535f6f 100644 (file)
@@ -1659,8 +1659,13 @@ gst_play_bin_set_suburi (GstPlayBin * playbin, const gchar * suburi)
 static void
 gst_play_bin_set_flags (GstPlayBin * playbin, GstPlayFlags flags)
 {
-  gst_play_sink_set_flags (playbin->playsink, flags);
-  gst_play_sink_reconfigure (playbin->playsink);
+  GstPlayFlags old_flags;
+  old_flags = gst_play_sink_get_flags (playbin->playsink);
+
+  if (flags != old_flags) {
+    gst_play_sink_set_flags (playbin->playsink, flags);
+    gst_play_sink_reconfigure (playbin->playsink);
+  }
 }
 
 static GstPlayFlags