diff options
author | Thiago Santos <ts.santos@sisa.samsung.com> | 2014-05-12 18:28:45 -0300 |
---|---|---|
committer | Thiago Santos <ts.santos@sisa.samsung.com> | 2014-05-12 18:28:45 -0300 |
commit | ce7319c62da1e5deea16772253ddb9fd9ffaacfe (patch) | |
tree | 261e9201b539e964361a2e54537492981f203593 /ext | |
parent | a1f87d0b4f86d1155a84eb77a56f24d4e4ff8b27 (diff) |
mssdemux: avoid deadlocking when erroring
It might get stuck when posting the message while
a reconfigure event is being pushed upstream
Diffstat (limited to 'ext')
-rw-r--r-- | ext/smoothstreaming/gstmssdemux.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c index 6b6e74a22..14954f084 100644 --- a/ext/smoothstreaming/gstmssdemux.c +++ b/ext/smoothstreaming/gstmssdemux.c @@ -1519,9 +1519,7 @@ gst_mss_demux_download_loop (GstMssDemuxStream * stream) if (ret <= GST_FLOW_ERROR) { GST_WARNING_OBJECT (mssdemux, "Error while downloading fragment"); if (++stream->download_error_count >= MAX_DOWNLOAD_ERROR_COUNT) { - GST_ELEMENT_ERROR (mssdemux, RESOURCE, NOT_FOUND, - (_("Couldn't download fragments")), - ("fragment downloading has failed too much consecutive times")); + goto download_error; } } break; @@ -1532,13 +1530,22 @@ gst_mss_demux_download_loop (GstMssDemuxStream * stream) gst_mss_demux_stream_push_event (stream, gst_event_new_eos ()); } +end: GST_LOG_OBJECT (stream->pad, "download loop end"); return; cancelled: { GST_DEBUG_OBJECT (stream->pad, "Stream has been cancelled"); - return; + goto end; + } +download_error: + { + GST_OBJECT_UNLOCK (mssdemux); + GST_ELEMENT_ERROR (mssdemux, RESOURCE, NOT_FOUND, + (_("Couldn't download fragments")), + ("fragment downloading has failed too much consecutive times")); + goto end; } } |