dashsink: Unlock when failed to get content
authorWonchul Lee <wonchul.dev@gmail.com>
Tue, 19 Apr 2022 23:09:58 +0000 (08:09 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 20 Apr 2022 09:07:29 +0000 (09:07 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2242>

subprojects/gst-plugins-bad/ext/dash/gstdashsink.c

index dd8d9f8..8a94d37 100644 (file)
@@ -854,8 +854,10 @@ gst_dash_sink_write_mpd_file (GstDashSink * sink,
 
   g_mutex_lock (&sink->mpd_lock);
   gst_dash_sink_generate_mpd_content (sink, current_stream);
-  if (!gst_mpd_client_get_xml_content (sink->mpd_client, &mpd_content, &size))
+  if (!gst_mpd_client_get_xml_content (sink->mpd_client, &mpd_content, &size)) {
+    g_mutex_unlock (&sink->mpd_lock);
     return;
+  }
   g_mutex_unlock (&sink->mpd_lock);
 
   if (sink->mpd_root_path)