fix errors

Original commit message from CVS:
fix errors
This commit is contained in:
Thomas Vander Stichele 2004-02-22 14:07:55 +00:00
parent cded585aa2
commit 62537fecd4
7 changed files with 28 additions and 24 deletions

View file

@ -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:

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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),

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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),