GNOME Bugzilla – Bug 774173
media: emit signal SIGNAL_NEW_STATE only when state change happens
Last modified: 2016-11-10 11:17:28 UTC
Created attachment 339424 [details] [review] Patch Pre-condition: Multiple sink devices are connected and gst_rtsp_media_factory_set_shared propoerty is set to true (that is all clients are sharing same media). Reference code: rtsp-media.c Line number: 3847 if (priv->target_state != state) { if (do_state) media_set_pipeline_state_locked (media, state); g_signal_emit (media, gst_rtsp_media_signals[SIGNAL_NEW_STATE], 0, state, NULL); } Reproduction Steps: State change request from one client (ex. Pause request from 1st client), media state changed is not done in this case as other clients are active and using the same media. Line 3848: do_state is false, and media_set_pipeline_state_locked will not be executed. But, SIGNAL_NEW_STATE is emitted at this point, whereas media state is not changed. Possible solution: Signal to be emitted inside do_state check.
Please attach "git format-patch" style patches in the future and use gst-indent. Thanks :) commit 166a90359470eecfcbefbb64c118ce46eb34e72b Author: Neha Arora <arora.neha@samsung.com> Date: Thu Nov 10 05:16:00 2016 +0000 rtsp-media: Only signal "new-state" if the state has actually changed https://bugzilla.gnome.org/show_bug.cgi?id=774173