mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
adaptivedemux: Handle errors from prepared_streams too
Check both active and prepared_streams when we receive an error on the bus, so we post errors for streams that are still pre-rolling
This commit is contained in:
parent
4a0bb14d9c
commit
69d2f80954
1 changed files with 45 additions and 28 deletions
|
@ -827,7 +827,7 @@ gst_adaptive_demux_handle_message (GstBin * bin, GstMessage * msg)
|
||||||
switch (GST_MESSAGE_TYPE (msg)) {
|
switch (GST_MESSAGE_TYPE (msg)) {
|
||||||
case GST_MESSAGE_ERROR:{
|
case GST_MESSAGE_ERROR:{
|
||||||
GList *iter;
|
GList *iter;
|
||||||
GstAdaptiveDemuxStream *stream;
|
GstAdaptiveDemuxStream *stream = NULL;
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
gchar *debug = NULL;
|
gchar *debug = NULL;
|
||||||
gchar *new_error = NULL;
|
gchar *new_error = NULL;
|
||||||
|
@ -836,9 +836,29 @@ gst_adaptive_demux_handle_message (GstBin * bin, GstMessage * msg)
|
||||||
GST_MANIFEST_LOCK (demux);
|
GST_MANIFEST_LOCK (demux);
|
||||||
|
|
||||||
for (iter = demux->streams; iter; iter = g_list_next (iter)) {
|
for (iter = demux->streams; iter; iter = g_list_next (iter)) {
|
||||||
stream = iter->data;
|
GstAdaptiveDemuxStream *cur = iter->data;
|
||||||
if (gst_object_has_as_ancestor (GST_MESSAGE_SRC (msg),
|
if (gst_object_has_as_ancestor (GST_MESSAGE_SRC (msg),
|
||||||
GST_OBJECT_CAST (stream->src))) {
|
GST_OBJECT_CAST (cur->src))) {
|
||||||
|
stream = cur;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (stream == NULL) {
|
||||||
|
for (iter = demux->prepared_streams; iter; iter = g_list_next (iter)) {
|
||||||
|
GstAdaptiveDemuxStream *cur = iter->data;
|
||||||
|
if (gst_object_has_as_ancestor (GST_MESSAGE_SRC (msg),
|
||||||
|
GST_OBJECT_CAST (cur->src))) {
|
||||||
|
stream = cur;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (stream == NULL) {
|
||||||
|
GST_WARNING_OBJECT (demux,
|
||||||
|
"Failed to locate stream for errored element");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gst_message_parse_error (msg, &err, &debug);
|
gst_message_parse_error (msg, &err, &debug);
|
||||||
|
|
||||||
GST_WARNING_OBJECT (GST_ADAPTIVE_DEMUX_STREAM_PAD (stream),
|
GST_WARNING_OBJECT (GST_ADAPTIVE_DEMUX_STREAM_PAD (stream),
|
||||||
|
@ -864,9 +884,6 @@ gst_adaptive_demux_handle_message (GstBin * bin, GstMessage * msg)
|
||||||
|
|
||||||
g_error_free (err);
|
g_error_free (err);
|
||||||
g_free (debug);
|
g_free (debug);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_MANIFEST_UNLOCK (demux);
|
GST_MANIFEST_UNLOCK (demux);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue