Commit 54341cbe authored by Wim Taymans's avatar Wim Taymans

Fix compile error

Original commit message from CVS:
Fix compile error
Add some more debug info
parent 3b184849
......@@ -227,11 +227,11 @@ gst_vorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
{
guint32 got_bytes;
guint8 *data;
size_t read_size = size * nmemb;
guint32 read_size = size * nmemb;
VorbisFile *vorbisfile = GST_VORBISFILE (datasource);
GST_DEBUG (0, "read %" G_GINT64_FORMAT, read_size);
GST_DEBUG (0, "read %d", read_size);
/* make sure we don't go to EOS */
if (!vorbisfile->may_eos && vorbisfile->total_bytes &&
......@@ -246,6 +246,8 @@ gst_vorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
do {
got_bytes = gst_bytestream_peek_bytes (vorbisfile->bs, &data, read_size);
GST_DEBUG (0, "peek returned %d", got_bytes);
if (got_bytes == 0) {
GstEvent *event;
guint32 avail;
......@@ -262,12 +264,15 @@ gst_vorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
GST_DEBUG (0, "discont");
vorbisfile->need_discont = TRUE;
default:
GST_DEBUG (0, "unknown event %d", GST_EVENT_TYPE (event));
break;
}
gst_event_unref (event);
}
} while (got_bytes == 0);
GST_DEBUG (0, "read %d got %d bytes", read_size, got_bytes);
memcpy (ptr, data, got_bytes);
gst_bytestream_flush_fast (vorbisfile->bs, got_bytes);
......@@ -285,7 +290,6 @@ gst_vorbisfile_seek (void *datasource, int64_t offset, int whence)
guint64 pending_offset = vorbisfile->offset;
gboolean need_total = FALSE;
if (!vorbisfile->vf.seekable) {
return -1;
}
......@@ -484,7 +488,7 @@ gst_vorbisfile_loop (GstElement *element)
vorbisfile->may_eos = FALSE;
vorbisfile->vf.seekable = gst_bytestream_seek (vorbisfile->bs, 0,
GST_SEEK_METHOD_SET);
GST_DEBUG (GST_CAT_PLUGIN_INFO, "vorbisfile: seekable: %s\n",
GST_DEBUG (GST_CAT_PLUGIN_INFO, "vorbisfile: seekable: %s",
vorbisfile->vf.seekable ? "yes" : "no");
/* open our custom vorbisfile data object with the callbacks we provide */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment