After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774173 - media: emit signal SIGNAL_NEW_STATE only when state change happens
media: emit signal SIGNAL_NEW_STATE only when state change happens
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
Other All
: Normal major
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2016-11-10 05:16 UTC by Neha Arora
Modified: 2016-11-10 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---

Patch (810 bytes, patch)
2016-11-10 05:16 UTC, Neha Arora
committed Details | Review

Description Neha Arora 2016-11-10 05:16:34 UTC
Created attachment 339424 [details] [review]

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.
Comment 1 Sebastian Dröge (slomo) 2016-11-10 11:17:02 UTC
Please attach "git format-patch" style patches in the future and use
gst-indent. Thanks :)

commit 166a90359470eecfcbefbb64c118ce46eb34e72b
Author: Neha Arora <>
Date:   Thu Nov 10 05:16:00 2016 +0000

    rtsp-media: Only signal "new-state" if the state has actually changed