mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
event: Don't allow invalid SELECT_STREAMS event creation
Asking to select no streams makes no sense and can create various issues. If one doesn't one any stream it should deactivate (or not use) the element in question.
This commit is contained in:
parent
4844adf193
commit
c0c9a531ef
1 changed files with 6 additions and 1 deletions
|
@ -593,7 +593,10 @@ gst_event_parse_flush_stop (GstEvent * event, gboolean * reset_time)
|
|||
* in #GST_EVENT_STREAM_START, #GST_EVENT_STREAM_COLLECTION or
|
||||
* #GST_MESSSAGE_STREAM_COLLECTION.
|
||||
*
|
||||
* Returns: (transfer full): a new select-streams event.
|
||||
* Note: The list of @streams can not be empty.
|
||||
*
|
||||
* Returns: (transfer full): a new select-streams event or %NULL in case of
|
||||
* an error (like an empty streams list).
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
|
@ -605,6 +608,8 @@ gst_event_new_select_streams (GList * streams)
|
|||
GstStructure *struc;
|
||||
GList *tmpl;
|
||||
|
||||
g_return_val_if_fail (streams != NULL, NULL);
|
||||
|
||||
GST_CAT_INFO (GST_CAT_EVENT, "Creating new select-streams event");
|
||||
struc = gst_structure_new_id_empty (GST_QUARK (EVENT_SELECT_STREAMS));
|
||||
g_value_init (&val, GST_TYPE_LIST);
|
||||
|
|
Loading…
Reference in a new issue