mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
filesrc: cleanup error path
This commit is contained in:
parent
1ac7160031
commit
e7e948a5bf
1 changed files with 9 additions and 8 deletions
|
@ -518,7 +518,7 @@ no_filename:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
|
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
|
||||||
(_("No file name specified for reading.")), (NULL));
|
(_("No file name specified for reading.")), (NULL));
|
||||||
return FALSE;
|
goto error_exit;
|
||||||
}
|
}
|
||||||
open_failed:
|
open_failed:
|
||||||
{
|
{
|
||||||
|
@ -533,29 +533,30 @@ open_failed:
|
||||||
GST_ERROR_SYSTEM);
|
GST_ERROR_SYSTEM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return FALSE;
|
goto error_exit;
|
||||||
}
|
}
|
||||||
no_stat:
|
no_stat:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
|
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
|
||||||
(_("Could not get info on \"%s\"."), src->filename), (NULL));
|
(_("Could not get info on \"%s\"."), src->filename), (NULL));
|
||||||
close (src->fd);
|
goto error_close;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
was_directory:
|
was_directory:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
|
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
|
||||||
(_("\"%s\" is a directory."), src->filename), (NULL));
|
(_("\"%s\" is a directory."), src->filename), (NULL));
|
||||||
close (src->fd);
|
goto error_close;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
was_socket:
|
was_socket:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
|
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
|
||||||
(_("File \"%s\" is a socket."), src->filename), (NULL));
|
(_("File \"%s\" is a socket."), src->filename), (NULL));
|
||||||
close (src->fd);
|
goto error_close;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
error_close:
|
||||||
|
close (src->fd);
|
||||||
|
error_exit:
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unmap and close the file */
|
/* unmap and close the file */
|
||||||
|
|
Loading…
Reference in a new issue