mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
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.
This commit is contained in:
parent
8e2bcd4190
commit
5effd6fe5d
3 changed files with 22 additions and 1 deletions
|
@ -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 (i<size) {
|
||||
g_print("%02x ", mem[i]);
|
||||
if (j == 16) {
|
||||
g_print("\n");
|
||||
j = 0;
|
||||
}
|
||||
else {
|
||||
j++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
g_print("\n");
|
||||
}
|
||||
|
|
|
@ -31,5 +31,6 @@ guchar *gst_util_get_string_arg(GtkObject *object,guchar *argname);
|
|||
gpointer gst_util_get_pointer_arg(GtkObject *object,guchar *argname);
|
||||
GtkWidget *gst_util_get_widget_arg(GtkObject *object,guchar *argname);
|
||||
|
||||
void gst_util_dump_mem(guchar *mem, guint size);
|
||||
|
||||
#endif /* __GST_UTILS_H__ */
|
||||
|
|
|
@ -118,6 +118,7 @@ gint gst_riff_parser_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off) {
|
|||
}
|
||||
}
|
||||
|
||||
if (riff->nextlikely & 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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue