rtsp-media: don't collect media stats when going to NULL
authorDavid Svensson Fors <davidsf@axis.com>
Wed, 13 Jun 2012 09:43:17 +0000 (11:43 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 14 Jun 2012 08:14:06 +0000 (10:14 +0200)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=678015

gst/rtsp-server/rtsp-media.c

index 3d2377c..c2f37d4 100644 (file)
@@ -2017,7 +2017,8 @@ gst_rtsp_media_set_state (GstRTSPMedia * media, GstState state,
   }
 
   /* remember where we are */
-  if (state == GST_STATE_PAUSED || old_active != media->active)
+  if (state != GST_STATE_NULL && (state == GST_STATE_PAUSED ||
+          old_active != media->active))
     collect_media_stats (media);
 
   return TRUE;