After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794966 - rtsp-stream: avoid deadlock when playing a media where some streams are inactive
rtsp-stream: avoid deadlock when playing a media where some streams are inactive
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-04 06:41 UTC by Branko Subasic
Modified: 2018-11-03 15:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Drop buffers in blocking probe attached to inactive streams (4.74 KB, patch)
2018-04-04 06:45 UTC, Branko Subasic
reviewed Details | Review

Description Branko Subasic 2018-04-04 06:41:44 UTC
If playing a media with multiple streams, all originating from the same single threaded source, such as a a matroska demuxer, the streaming will be blocked when the inactive parts of the pipeline are filled. This is because there are blocking probes attached to those streams.
We can avoid that by letting the probes drop buffers when playing.
Comment 1 Branko Subasic 2018-04-04 06:45:38 UTC
Created attachment 370516 [details] [review]
Drop buffers in blocking probe attached to inactive streams
Comment 2 Sebastian Dröge (slomo) 2018-04-04 07:02:38 UTC
Instead of keeping the pad probe and dropping buffers, why don't we just unblock and let buffers disappear by themselves?
Comment 3 Sebastian Dröge (slomo) 2018-04-04 07:03:15 UTC
Also if the stream is already blocked, setting it to drop buffers won't have any effect because the probe would not be called again, or am I missing something?
Comment 4 Sebastian Dröge (slomo) 2018-04-04 07:04:36 UTC
Review of attachment 370516 [details] [review]:

::: gst/rtsp-server/rtsp-media.c
@@ +4385,2 @@
+    /* a stream transport is connected to a stream from it's creation to it's
+     * destruction and thus it must be possible to obtain "it's" stream while

its not it's :)

::: gst/rtsp-server/rtsp-stream.c
@@ +4686,3 @@
+  g_mutex_lock (&priv->lock);
+  if (!priv->is_complete) {
+    priv->drop_buffers = TRUE;

This seems a bit unintuitive. If setting it to dropping it should probably always do that.
Comment 5 GStreamer system administrator 2018-11-03 15:41:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/39.