GNOME Bugzilla – Bug 690148
hlsdemux: hangs when network disconnects or when server is unreachable
Last modified: 2013-10-03 13:16:05 UTC
hi, i am playing a stream from a local HLS server, setup on MAC machine this is the launch string GST_DEBUG=3,uridownloader:5,hlsdemux:5 gst-launch-1.0 playbin uri=http://191.161.91.31/new/prog_index.m3u8 2>debug2 when i disconnect the network or stop the web sharing on MAC. hlsdemux hangs in doing this gst_element_set_state (downloader->priv->urisrc, GST_STATE_NULL); gsturidownloader.c line 261 i have attached the log for 1.0 observed same thing on 0.10 and on debugging on 0.10 I observed that gstbasesrc.c hangs in gst_base_src_set_flushing() while locking this mutex GST_LIVE_LOCK (basesrc); this mutex is already locked in gst_base_src_loop()
Created attachment 231461 [details] gstreamer log
i think the issue is here in this function gst_hls_demux_get_next_fragment on getting error downloading the segment error: we are doing gst_hls_demux_stop in which we are trying to lock updates_timed_lock which is already locked by the same thread.
Thanks for reporting, your findings were right, this patch fixes it on git master. commit 72e05dfd7c82ce45e5141c5506e203d05fb2daf9 Author: Thiago Santos <ts.santos@partner.samsung.com> Date: Thu Oct 3 07:56:21 2013 -0300 hlsdemux: Do not call _stop holding the updates lock It will cause a deadlock and the calers for _get_next_fragment will already call _stop if required when _get_next_fragment fails. Fixes #690148