Mismatched NULL handling between GstPlayer/GstPlay and playbin2/3
Describe your issue
The uri
argument for gst_player_set_uri()
is marked as nullable:
/**
* gst_player_set_uri:
* @player: #GstPlayer instance
* @uri: (nullable): next URI to play.
*
* Sets the next URI to play.
*/
Internally, the GstPlayer:uri
property calls gst_play_set_uri()
, which is also explicitly allowing a NULL
value for the uri
argument:
/**
* gst_play_set_uri:
* @play: #GstPlay instance
* @uri: (nullable): next URI to play.
*
* Sets the next URI to play.
* Since: 1.20
*/
GstPlay:uri
will eventually set the uri
property on either the playbin2
or the playbin3
elements, which do not support a NULL
URI:
if (uri == NULL) {
g_warning ("cannot set NULL uri");
return;
}
Expected Behavior
No warning when calling gst_player_set_uri (player, NULL)
.
Observed Behavior
The following warning:
** (amberol:2): WARNING **: 16:34:51.870: cannot set NULL uri
Setup
- Operating System: Fedora Silverblue
- Device: Computer
- GStreamer Version: 1.18, but verified to commit 6d2f57b6
Edited by Emmanuele Bassi