mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
Fix compile error
Original commit message from CVS: Fix compile error Add some more debug info
This commit is contained in:
parent
3b184849b1
commit
54341cbe3b
1 changed files with 8 additions and 4 deletions
|
@ -227,11 +227,11 @@ gst_vorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
|
||||||
{
|
{
|
||||||
guint32 got_bytes;
|
guint32 got_bytes;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
size_t read_size = size * nmemb;
|
guint32 read_size = size * nmemb;
|
||||||
|
|
||||||
VorbisFile *vorbisfile = GST_VORBISFILE (datasource);
|
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 */
|
/* make sure we don't go to EOS */
|
||||||
if (!vorbisfile->may_eos && vorbisfile->total_bytes &&
|
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 {
|
do {
|
||||||
got_bytes = gst_bytestream_peek_bytes (vorbisfile->bs, &data, read_size);
|
got_bytes = gst_bytestream_peek_bytes (vorbisfile->bs, &data, read_size);
|
||||||
|
|
||||||
|
GST_DEBUG (0, "peek returned %d", got_bytes);
|
||||||
|
|
||||||
if (got_bytes == 0) {
|
if (got_bytes == 0) {
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
guint32 avail;
|
guint32 avail;
|
||||||
|
@ -262,12 +264,15 @@ gst_vorbisfile_read (void *ptr, size_t size, size_t nmemb, void *datasource)
|
||||||
GST_DEBUG (0, "discont");
|
GST_DEBUG (0, "discont");
|
||||||
vorbisfile->need_discont = TRUE;
|
vorbisfile->need_discont = TRUE;
|
||||||
default:
|
default:
|
||||||
|
GST_DEBUG (0, "unknown event %d", GST_EVENT_TYPE (event));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
}
|
}
|
||||||
} while (got_bytes == 0);
|
} while (got_bytes == 0);
|
||||||
|
|
||||||
|
GST_DEBUG (0, "read %d got %d bytes", read_size, got_bytes);
|
||||||
|
|
||||||
memcpy (ptr, data, got_bytes);
|
memcpy (ptr, data, got_bytes);
|
||||||
gst_bytestream_flush_fast (vorbisfile->bs, 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;
|
guint64 pending_offset = vorbisfile->offset;
|
||||||
gboolean need_total = FALSE;
|
gboolean need_total = FALSE;
|
||||||
|
|
||||||
|
|
||||||
if (!vorbisfile->vf.seekable) {
|
if (!vorbisfile->vf.seekable) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -484,7 +488,7 @@ gst_vorbisfile_loop (GstElement *element)
|
||||||
vorbisfile->may_eos = FALSE;
|
vorbisfile->may_eos = FALSE;
|
||||||
vorbisfile->vf.seekable = gst_bytestream_seek (vorbisfile->bs, 0,
|
vorbisfile->vf.seekable = gst_bytestream_seek (vorbisfile->bs, 0,
|
||||||
GST_SEEK_METHOD_SET);
|
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");
|
vorbisfile->vf.seekable ? "yes" : "no");
|
||||||
|
|
||||||
/* open our custom vorbisfile data object with the callbacks we provide */
|
/* open our custom vorbisfile data object with the callbacks we provide */
|
||||||
|
|
Loading…
Reference in a new issue