mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
fix errors
Original commit message from CVS: fix errors
This commit is contained in:
parent
cded585aa2
commit
62537fecd4
7 changed files with 28 additions and 24 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-02-22 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/elements/gstfilesink.c: (gst_filesink_open_file):
|
||||
* gst/elements/gstfilesrc.c: (gst_filesrc_open_file):
|
||||
* gst/elements/gstmultifilesrc.c: (gst_multifilesrc_open_file):
|
||||
|
||||
2004-02-20 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* gst/gstbin.c:
|
||||
|
|
|
@ -242,10 +242,10 @@ gst_filesink_open_file (GstFileSink *sink)
|
|||
g_return_val_if_fail (!GST_FLAG_IS_SET (sink, GST_FILESINK_OPEN), FALSE);
|
||||
|
||||
/* open the file */
|
||||
if (!sink->filename)
|
||||
if (sink->filename == NULL || sink->filename[0] == '\0')
|
||||
{
|
||||
GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND,
|
||||
(_("No filename specified.")), (NULL));
|
||||
(_("No file name specified for writing.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -670,17 +670,10 @@ gst_filesrc_open_file (GstFileSrc *src)
|
|||
{
|
||||
g_return_val_if_fail (!GST_FLAG_IS_SET (src ,GST_FILESRC_OPEN), FALSE);
|
||||
|
||||
if (src->filename == NULL)
|
||||
if (src->filename == NULL || src->filename[0] == '\0')
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
|
||||
(_("No filename specified.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (src->filename == NULL)
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
|
||||
(_("No file specified for reading.")), (NULL));
|
||||
(_("No file name specified for reading.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -236,9 +236,15 @@ gboolean gst_multifilesrc_open_file (GstMultiFileSrc *src, GstPad *srcpad)
|
|||
{
|
||||
g_return_val_if_fail (!GST_FLAG_IS_SET (src, GST_MULTIFILESRC_OPEN), FALSE);
|
||||
|
||||
if (src->currentfilename == NULL || src->currentfilename[0] == '\0')
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
|
||||
(_("No file name specified for reading.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* open the file */
|
||||
src->fd = open ((const char *) src->currentfilename, O_RDONLY);
|
||||
|
||||
if (src->fd < 0) {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
|
||||
(_("Could not open file \"%s\" for reading."), src->currentfilename),
|
||||
|
|
|
@ -242,10 +242,10 @@ gst_filesink_open_file (GstFileSink *sink)
|
|||
g_return_val_if_fail (!GST_FLAG_IS_SET (sink, GST_FILESINK_OPEN), FALSE);
|
||||
|
||||
/* open the file */
|
||||
if (!sink->filename)
|
||||
if (sink->filename == NULL || sink->filename[0] == '\0')
|
||||
{
|
||||
GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND,
|
||||
(_("No filename specified.")), (NULL));
|
||||
(_("No file name specified for writing.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -670,17 +670,10 @@ gst_filesrc_open_file (GstFileSrc *src)
|
|||
{
|
||||
g_return_val_if_fail (!GST_FLAG_IS_SET (src ,GST_FILESRC_OPEN), FALSE);
|
||||
|
||||
if (src->filename == NULL)
|
||||
if (src->filename == NULL || src->filename[0] == '\0')
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
|
||||
(_("No filename specified.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (src->filename == NULL)
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
|
||||
(_("No file specified for reading.")), (NULL));
|
||||
(_("No file name specified for reading.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -236,9 +236,15 @@ gboolean gst_multifilesrc_open_file (GstMultiFileSrc *src, GstPad *srcpad)
|
|||
{
|
||||
g_return_val_if_fail (!GST_FLAG_IS_SET (src, GST_MULTIFILESRC_OPEN), FALSE);
|
||||
|
||||
if (src->currentfilename == NULL || src->currentfilename[0] == '\0')
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
|
||||
(_("No file name specified for reading.")), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* open the file */
|
||||
src->fd = open ((const char *) src->currentfilename, O_RDONLY);
|
||||
|
||||
if (src->fd < 0) {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
|
||||
(_("Could not open file \"%s\" for reading."), src->currentfilename),
|
||||
|
|
Loading…
Reference in a new issue