[Bug 755169] dashdemux: can we have multiple seek events at the same time?

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Sep 25 09:42:37 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=755169

--- Comment #55 from Florin Apostol <florin.apostol at oregan.net> ---
Review of attachment 312126:
 --> (https://bugzilla.gnome.org/review?bug=755169&attachment=312126)

1. gst_adaptive_demux_stream_free function:
      g_cond_signal (&stream->fragment_download_cond);
      gst_task_stop (stream->download_task);

The g_cond_signal call might have no effect if not issued with the lock taken
and after setting a flag that the waiting thread will watch for. The waiting
thread should sleep in a while loop that checks for the flag. See
https://developer.gnome.org/glib/stable/glib-Threads.html#g-cond-wait-until for
a reason and example.

::: gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ +1276,3 @@

+  g_mutex_lock (&demux->priv->api_lock);
+

this deadlocks on the following scenario:

manifest received, gst_adaptive_demux_expose_streams called.
gst_adaptive_demux_expose_stream will create src pads. I have a callback
registered so that when dash creates a src pad, I create an AppSink element and
link them. During linking, gst_element_link will call
gst_adaptive_demux_src_query which will try to grab api_lock. It deadlocks
because the api_lock is still taken.
So, queries can happen from the same tread, while creating pads. Need a
reentrant mutex here too, similar to the exposing one

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list