diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c index 3d2377c673..c2f37d48f0 100644 --- a/gst/rtsp-server/rtsp-media.c +++ b/gst/rtsp-server/rtsp-media.c @@ -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;