mssdemux: do not try to deinit the downloadrate while it is used
authorThiago Santos <ts.santos@partner.samsung.com>
Thu, 14 Nov 2013 01:25:59 +0000 (22:25 -0300)
committerThiago Santos <ts.santos@sisa.samsung.com>
Fri, 15 Nov 2013 15:31:19 +0000 (12:31 -0300)
This can cause an assertion or deadlocks.

ext/smoothstreaming/gstmssdemux.c

index 058016c23c1871000d98a7bd4869d94967de6a91..368863969dd05a14eb193f8d23de7f76037aee82 100644 (file)
@@ -255,7 +255,6 @@ gst_mss_demux_stream_new (GstMssDemux * mssdemux,
 static void
 gst_mss_demux_stream_free (GstMssDemuxStream * stream)
 {
-  gst_download_rate_deinit (&stream->download_rate);
   if (stream->download_task) {
     if (GST_TASK_STATE (stream->download_task) != GST_TASK_STOPPED) {
       GST_DEBUG_OBJECT (stream->parent, "Leaving streaming task %s:%s",
@@ -273,12 +272,12 @@ gst_mss_demux_stream_free (GstMssDemuxStream * stream)
     stream->download_task = NULL;
   }
 
+  gst_download_rate_deinit (&stream->download_rate);
   if (stream->pending_newsegment) {
     gst_event_unref (stream->pending_newsegment);
     stream->pending_newsegment = NULL;
   }
 
-
   if (stream->downloader != NULL) {
     g_object_unref (stream->downloader);
     stream->downloader = NULL;