mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
gst/avi/gstavimux.c: Fix...
Original commit message from CVS: * gst/avi/gstavimux.c: (gst_avimux_write_tag), (gst_avimux_riff_get_avi_header): Fix...
This commit is contained in:
parent
44e0ac6e5e
commit
1c3dc42d55
2 changed files with 14 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-01-22 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/avi/gstavimux.c: (gst_avimux_write_tag),
|
||||
(gst_avimux_riff_get_avi_header):
|
||||
Fix...
|
||||
|
||||
2005-01-19 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst-libs/gst/riff/riff-read.c: (gst_riff_peek_element_data),
|
||||
|
|
|
@ -593,6 +593,7 @@ gst_avimux_write_tag (const GstTagList * list, const gchar * tag, gpointer data)
|
|||
};
|
||||
gint n, len, plen;
|
||||
GstBuffer *buf = data;
|
||||
guint8 *buffdata = GST_BUFFER_DATA (buf) + GST_BUFFER_SIZE (buf);
|
||||
gchar *str;
|
||||
|
||||
for (n = 0; rifftags[n].fcc != 0; n++) {
|
||||
|
@ -603,15 +604,15 @@ gst_avimux_write_tag (const GstTagList * list, const gchar * tag, gpointer data)
|
|||
if (plen & 1)
|
||||
plen++;
|
||||
if (GST_BUFFER_MAXSIZE (buf) >= GST_BUFFER_SIZE (buf) + 8 + plen) {
|
||||
GST_WRITE_UINT32_LE (GST_BUFFER_DATA (buf), rifftags[n].fcc);
|
||||
GST_WRITE_UINT32_LE (GST_BUFFER_DATA (buf) + 4, len + 1);
|
||||
memcpy (GST_BUFFER_DATA (buf) + 8, str, len);
|
||||
GST_BUFFER_DATA (buf)[8 + len] = 0;
|
||||
GST_WRITE_UINT32_LE (buffdata, rifftags[n].fcc);
|
||||
GST_WRITE_UINT32_LE (buffdata + 4, len + 1);
|
||||
memcpy (buffdata + 8, str, len);
|
||||
buffdata[8 + len] = 0;
|
||||
GST_BUFFER_SIZE (buf) += 8 + plen;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static GstBuffer *
|
||||
|
@ -797,13 +798,13 @@ gst_avimux_riff_get_avi_header (GstAviMux * avimux)
|
|||
buffdata = GST_BUFFER_DATA (buffer) + GST_BUFFER_SIZE (buffer);
|
||||
|
||||
/* update list size */
|
||||
GST_WRITE_UINT32_LE (ptr, GST_BUFFER_SIZE (buffer) - startsize);
|
||||
GST_WRITE_UINT32_LE (ptr, GST_BUFFER_SIZE (buffer) - startsize - 4);
|
||||
}
|
||||
|
||||
/* avi data header */
|
||||
memcpy (buffdata + 0, "LIST", 4);
|
||||
GST_WRITE_UINT32_LE (buffdata + 4, avimux->data_size);
|
||||
memcpy (buffdata + 12, "movi", 4);
|
||||
memcpy (buffdata + 8, "movi", 4);
|
||||
buffdata += 12;
|
||||
GST_BUFFER_SIZE (buffer) += 12;
|
||||
|
||||
|
|
Loading…
Reference in a new issue