[Bug 711849] smoothstreaming: Better handling of multi audio tracks

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Nov 29 13:17:14 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=711849
  GStreamer | gst-plugins-bad | unspecified

--- Comment #10 from Thiago Sousa Santos <thiago.sousa.santos at collabora.co.uk> 2013-11-29 21:17:09 UTC ---
Created an attachment (id=263167)
 View: https://bugzilla.gnome.org/attachment.cgi?id=263167
 Review: https://bugzilla.gnome.org/review?bug=711849&attachment=263167

mssdemux: prevent deadlock by pushing buffers from different threads

When streams are switching, the old active stream can be blocked because
input-selector will block not-linked streams. In case the mssdemux's
stream loop is blocked pushing a buffer to a full queue downstream it will
never unblock as the queue will not drain (input-selector is blocking).

In this scenario, stream switching will deadlock as input-selector is
waiting for the newly active stream data and the stream_loop that would
push this data is blocked waiting for input-selector.

To solve this issue, whenever an stream is reactivated on a reconfigure
it will enter into the 'catch up mode', in this mode it can push buffers
from its download thread until a certain timestamp. This works because
this timestamp will always be behind or equal to the maximum timestamp
pushed for all streams, after pushing data for this timestamp, the stream
will go back to default and be pushed sequentially from the main
streaming thread. By this time, the input-selector should have already
released the thread.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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