summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/gst-plugins/files/gst-plugins-0.4.2-wavparse-bigendian.patch')
-rw-r--r--media-libs/gst-plugins/files/gst-plugins-0.4.2-wavparse-bigendian.patch114
1 files changed, 0 insertions, 114 deletions
diff --git a/media-libs/gst-plugins/files/gst-plugins-0.4.2-wavparse-bigendian.patch b/media-libs/gst-plugins/files/gst-plugins-0.4.2-wavparse-bigendian.patch
deleted file mode 100644
index b33073eb0f47..000000000000
--- a/media-libs/gst-plugins/files/gst-plugins-0.4.2-wavparse-bigendian.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-diff -u gst/wavparse.orig/gstriff.c gst/wavparse/gstriff.c
---- gst/wavparse.orig/gstriff.c 2002-12-07 12:45:41.000000000 -0600
-+++ gst/wavparse/gstriff.c 2002-12-07 15:17:30.000000000 -0600
-@@ -69,9 +69,9 @@
- g_return_val_if_fail(chunk != NULL,0);
- chunk->offset = riff->nextlikely+8; /* point to the actual data */
- chunk->id = words[0];
-- chunk->size = words[1];
-+ chunk->size = GUINT32_FROM_LE(words[1]);
- /* g_print("chunk id is 0x%08x '%s' and is 0x%08x long\n",words[0], */
--/* gst_riff_id_to_fourcc(words[0]),words[1]); */
-+/* gst_riff_id_to_fourcc(words[0]),chunk->size); */
- riff->nextlikely += 8 + chunk->size; /* doesn't include hdr */
- riff->chunks = g_list_prepend(riff->chunks,chunk);
- }
-@@ -82,15 +82,15 @@
-
- gulong gst_riff_fourcc_to_id(gchar *fourcc) {
- g_return_val_if_fail(fourcc != NULL,0);
--
-- return (fourcc[0] << 0) | (fourcc[1] << 8) |
-- (fourcc[2] << 16) | (fourcc[3] << 24);
-+ return GUINT32_FROM_LE((gulong)(fourcc[0] << 0) | (fourcc[1] << 8) |
-+ (fourcc[2] << 16) | (fourcc[3] << 24));
- }
-
- gchar *gst_riff_id_to_fourcc(gulong id) {
- gchar *fourcc = (gchar *)malloc(5);
-
- g_return_val_if_fail(fourcc != NULL, NULL);
-+ id = GUINT32_FROM_LE(id);
-
- fourcc[0] = (id >> 0) & 0xff;
- fourcc[1] = (id >> 8) & 0xff;
-diff -u gst/wavparse.orig/gstwavparse.c gst/wavparse/gstwavparse.c
---- gst/wavparse.orig/gstwavparse.c 2002-12-07 12:45:41.000000000 -0600
-+++ gst/wavparse/gstwavparse.c 2002-12-07 15:17:37.000000000 -0600
-@@ -61,7 +61,10 @@
- "format", GST_PROPS_STRING ("int"),
- "law", GST_PROPS_INT (0),
- "endianness", GST_PROPS_INT (G_BYTE_ORDER),
-- "signed", GST_PROPS_BOOLEAN (TRUE),
-+ "signed", GST_PROPS_LIST (
-+ GST_PROPS_BOOLEAN (FALSE),
-+ GST_PROPS_BOOLEAN (TRUE)
-+ ),
- "width", GST_PROPS_LIST (
- GST_PROPS_INT (8),
- GST_PROPS_INT (16)
-@@ -262,6 +265,11 @@
- /* we can gather format information now */
- format = (GstWavParseFormat *)((guchar *) GST_BUFFER_DATA (buf) + fmt->offset);
-
-+ wavparse->bps = GUINT16_FROM_LE(format->wBlockAlign);
-+ wavparse->rate = GUINT32_FROM_LE(format->dwSamplesPerSec);
-+ wavparse->channels = GUINT16_FROM_LE(format->wChannels);
-+ wavparse->width = GUINT16_FROM_LE(format->wBitsPerSample);
-+
- /* set the caps on the src pad */
- caps = GST_CAPS_NEW (
- "parsewav_src",
-@@ -269,11 +277,11 @@
- "format", GST_PROPS_STRING ("int"),
- "law", GST_PROPS_INT (0), /*FIXME */
- "endianness", GST_PROPS_INT (G_BYTE_ORDER),
-- "signed", GST_PROPS_BOOLEAN (TRUE), /*FIXME */
-- "width", GST_PROPS_INT (format->wBitsPerSample),
-- "depth", GST_PROPS_INT (format->wBitsPerSample),
-- "rate", GST_PROPS_INT (format->dwSamplesPerSec),
-- "channels", GST_PROPS_INT (format->wChannels)
-+ "signed", GST_PROPS_BOOLEAN ((wavparse->width > 8) ? TRUE : FALSE),
-+ "width", GST_PROPS_INT (wavparse->width),
-+ "depth", GST_PROPS_INT (wavparse->width),
-+ "rate", GST_PROPS_INT (wavparse->rate),
-+ "channels", GST_PROPS_INT (wavparse->channels)
- );
-
- if (gst_pad_try_set_caps (wavparse->srcpad, caps) <= 0) {
-@@ -281,13 +289,8 @@
- return;
- }
-
-- wavparse->bps = format->wBlockAlign;
-- wavparse->rate = format->dwSamplesPerSec;
-- wavparse->channels = format->wChannels;
-- wavparse->width = format->wBitsPerSample;
--
- GST_DEBUG (0, "frequency %d, channels %d",
-- format->dwSamplesPerSec, format->wChannels);
-+ wavparse->rate, wavparse->channels);
-
- /* we're now looking for the data chunk */
- wavparse->state = GST_WAVPARSE_CHUNK_DATA;
---- gst-libs/gst/riff/riffutil.c.orig 2002-12-08 14:15:46.000000000 -0600
-+++ gst-libs/gst/riff/riffutil.c 2002-12-08 14:16:29.000000000 -0600
-@@ -27,8 +27,8 @@
- gulong gst_riff_fourcc_to_id(gchar *fourcc) {
- g_return_val_if_fail(fourcc != NULL, 0);
-
-- return (fourcc[0] << 0) | (fourcc[1] << 8) |
-- (fourcc[2] << 16) | (fourcc[3] << 24);
-+ return GUINT32_FROM_LE((gulong)(fourcc[0] << 0) | (fourcc[1] << 8) |
-+ (fourcc[2] << 16) | (fourcc[3] << 24));
- }
-
- gchar *gst_riff_id_to_fourcc(gulong id) {
-@@ -36,6 +36,7 @@
-
- g_return_val_if_fail(fourcc != NULL, NULL);
-
-+ id = GUINT32_FROM_LE(id);
- fourcc[0] = (id >> 0) & 0xff;
- fourcc[1] = (id >> 8) & 0xff;
- fourcc[2] = (id >> 16) & 0xff;