mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
applemedia: error out if the uri property is not set
Fixes: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString in the state change test.
This commit is contained in:
parent
b69dadcc61
commit
ba805938e3
1 changed files with 6 additions and 0 deletions
|
@ -246,6 +246,12 @@ gst_avf_asset_src_change_state (GstElement * element, GstStateChange transition)
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY: {
|
case GST_STATE_CHANGE_NULL_TO_READY: {
|
||||||
self->state = GST_AVF_ASSET_SRC_STATE_STOPPED;
|
self->state = GST_AVF_ASSET_SRC_STATE_STOPPED;
|
||||||
|
if (!self->uri) {
|
||||||
|
GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
|
||||||
|
("\"uri\" property not set"), (NULL));
|
||||||
|
gst_avf_asset_src_stop_all (self);
|
||||||
|
return GST_STATE_CHANGE_FAILURE;
|
||||||
|
}
|
||||||
self->reader = [[GstAVFAssetReader alloc] initWithURI:self->uri:&error];
|
self->reader = [[GstAVFAssetReader alloc] initWithURI:self->uri:&error];
|
||||||
if (error) {
|
if (error) {
|
||||||
GST_ELEMENT_ERROR (element, RESOURCE, FAILED, ("AVFAssetReader error"),
|
GST_ELEMENT_ERROR (element, RESOURCE, FAILED, ("AVFAssetReader error"),
|
||||||
|
|
Loading…
Reference in a new issue