Reset in_first_get flag when done reading, and on opening a file.
authorColin Walters <walters@verbum.org>
Sun, 20 Apr 2003 18:44:34 +0000 (18:44 +0000)
committerColin Walters <walters@verbum.org>
Sun, 20 Apr 2003 18:44:34 +0000 (18:44 +0000)
Original commit message from CVS:
Reset in_first_get flag when done reading, and on opening a file.

ext/gnomevfs/gstgnomevfssrc.c

index 4ddd8a8c1ce83e85bde98c22355340bbec82d431..c551ab6379264282892f98c9cb0ede520f0cee21 100644 (file)
@@ -957,6 +957,7 @@ static GstBuffer *gst_gnomevfssrc_get(GstPad *pad)
                } while (src->in_first_get
                         && GST_BUFFER_OFFSET (buf) < 8000 &&
                         src->icy_metaint - src->icy_count >= 8000);
+               src->in_first_get = FALSE;
        } else {
                /* allocate the space for the buffer data */
                GST_BUFFER_DATA(buf) = g_malloc(src->bytes_per_read);
@@ -1066,6 +1067,8 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
        
        GST_DEBUG(0, "open result: %s", gnome_vfs_result_to_string (result));
 
+       src->in_first_get = TRUE;
+
        GST_FLAG_SET(src, GST_GNOMEVFSSRC_OPEN);
 
        return TRUE;