commit dfc4f71c35b3f35c9496e28930c824d9224507e6
Author: neha86arora <arora.neha@samsung.com>
Date:   Thu Nov 10 10:28:20 2016 +0530

    media: emit signal SIGNAL_NEW_STATE only when state change happens

diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c
index 349311a..c6c43b0 100644
--- a/gst/rtsp-server/rtsp-media.c
+++ b/gst/rtsp-server/rtsp-media.c
@@ -3846,10 +3846,11 @@ gst_rtsp_media_set_state (GstRTSPMedia * media, GstState state,
 
   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,
+      g_signal_emit (media, gst_rtsp_media_signals[SIGNAL_NEW_STATE], 0, state,
         NULL);
+    }
   }
 
   /* remember where we are */
