mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gio: Improve the error message if a stream is already closed before usage
This commit is contained in:
parent
6025412707
commit
3116198fc3
2 changed files with 8 additions and 0 deletions
|
@ -119,6 +119,10 @@ gst_gio_base_sink_start (GstBaseSink * base_sink)
|
|||
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, (NULL),
|
||||
("No output stream provided by subclass"));
|
||||
return FALSE;
|
||||
} else if (G_UNLIKELY (g_output_stream_is_closed (sink->stream))) {
|
||||
GST_ELEMENT_ERROR (sink, LIBRARY, FAILED, (NULL),
|
||||
("Output stream is already closed"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (sink, "started sink");
|
||||
|
|
|
@ -130,6 +130,10 @@ gst_gio_base_src_start (GstBaseSrc * base_src)
|
|||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
|
||||
("No input stream provided by subclass"));
|
||||
return FALSE;
|
||||
} else if (G_UNLIKELY (g_input_stream_is_closed (src->stream))) {
|
||||
GST_ELEMENT_ERROR (src, LIBRARY, FAILED, (NULL),
|
||||
("Input stream is already closed"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (src, "started source");
|
||||
|
|
Loading…
Reference in a new issue