From 5effd6fe5d5187e8ad3e876b6996ca291c1c603c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 15 Jul 2000 13:26:28 +0000 Subject: [PATCH] Fixed a bug in the riff parser with the allignment of the chunks. This should solve the errors with avi playback. Original commit message from CVS: Fixed a bug in the riff parser with the allignment of the chunks. This should solve the errors with avi playback. --- gst/gstutils.c | 18 ++++++++++++++++++ gst/gstutils.h | 1 + libs/riff/gstriffparse.c | 4 +++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gst/gstutils.c b/gst/gstutils.c index d659fd5f46..cc631706fa 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -75,3 +75,21 @@ GtkWidget *gst_util_get_widget_arg(GtkObject *object,guchar *argname) { gtk_object_getv(GTK_OBJECT(object),1,&arg); return GTK_WIDGET(GTK_VALUE_OBJECT(arg)); } + +void gst_util_dump_mem(guchar *mem, guint size) { + guint i, j; + + i = j =0; + while (inextlikely & 0x01) riff->nextlikely++; DEBUG("gst_riff_parser: next 0x%08x last 0x%08lx offset %08x\n",riff->nextlikely, last, off); /* loop while the next likely chunk header is in this buffer */ @@ -148,7 +149,7 @@ gint gst_riff_parser_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off) { chunk->size = words[1]; chunk->data = (gchar *)(words+2); // we need word alignment - if (chunk->size & 0x01) chunk->size++; + //if (chunk->size & 0x01) chunk->size++; chunk->form = words[2]; /* fill in the form, might not be valid */ @@ -186,6 +187,7 @@ gint gst_riff_parser_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off) { } g_free(chunk); } + if (riff->nextlikely & 0x01) riff->nextlikely++; //riff->chunks = g_list_prepend(riff->chunks,chunk); }