summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--ext/xvid/gstxvidenc.c6
-rw-r--r--gst/filter/gstbpwsinc.c14
-rw-r--r--gst/filter/gstfilter.c4
-rw-r--r--gst/filter/gstiir.c6
-rw-r--r--gst/filter/gstlpwsinc.c14
-rw-r--r--gst/modplug/gstmodplug.cc2
-rw-r--r--gst/nuvdemux/gstnuvdemux.c9
8 files changed, 46 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 67335665..d987eca7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2007-01-03 Tim-Philipp Müller <tim at centricular dot net>
+
+ Patch by: Jens Granseuer <jensgr at gmx net>
+
+ * ext/xvid/gstxvidenc.c: (gst_xvidenc_encode),
+ (gst_xvidenc_get_property):
+ * gst/filter/gstbpwsinc.c: (bpwsinc_transform_ip):
+ * gst/filter/gstfilter.c: (plugin_init):
+ * gst/filter/gstiir.c: (iir_transform_ip):
+ * gst/filter/gstlpwsinc.c: (lpwsinc_transform_ip):
+ * gst/modplug/gstmodplug.cc:
+ * gst/nuvdemux/gstnuvdemux.c: (gst_nuv_demux_header_load),
+ (gst_nuv_demux_stream_extend_header):
+ Fix build with gcc-2.x (declare variables at the beginning of a
+ block etc.). Fixes #391971.
+
2007-01-02 Lutz Mueller <lutz@topfrose.de>
reviewed by: Edward Hervey <edward@fluendo.com>
diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c
index fb030f60..e2cf4aa4 100644
--- a/ext/xvid/gstxvidenc.c
+++ b/ext/xvid/gstxvidenc.c
@@ -806,8 +806,10 @@ gst_xvidenc_encode (GstXvidEnc * xvidenc, GstBuffer * buf,
gst_buffer_unref (outbuf);
return NULL;
} else if (ret > 0) { /* make sub-buffer */
+ GstBuffer *sub;
+
GST_DEBUG_OBJECT (xvidenc, "xvid produced output of size %d", ret);
- GstBuffer *sub = gst_buffer_create_sub (outbuf, 0, ret);
+ sub = gst_buffer_create_sub (outbuf, 0, ret);
/* parent no longer needed, will go away with child buffer */
gst_buffer_unref (outbuf);
@@ -1059,10 +1061,10 @@ gst_xvidenc_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec)
{
GstXvidEnc *xvidenc;
+ guint offset;
g_return_if_fail (GST_IS_XVIDENC (object));
xvidenc = GST_XVIDENC (object);
- guint offset;
if (prop_id > xvidenc_prop_count) {
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
diff --git a/gst/filter/gstbpwsinc.c b/gst/filter/gstbpwsinc.c
index 07175dee..6f3e5cc7 100644
--- a/gst/filter/gstbpwsinc.c
+++ b/gst/filter/gstbpwsinc.c
@@ -256,6 +256,13 @@ bpwsinc_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
GstBPWSinc *this = GST_BPWSINC (base);
GstClockTime timestamp;
+ gfloat *src;
+ gfloat *input;
+ int residue_samples;
+ gint input_samples;
+ gint total_samples;
+ int i, j;
+
/* don't process data in passthrough-mode */
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
@@ -266,13 +273,6 @@ bpwsinc_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
if (GST_CLOCK_TIME_IS_VALID (timestamp))
gst_object_sync_values (G_OBJECT (this), timestamp);
- gfloat *src;
- gfloat *input;
- int residue_samples;
- gint input_samples;
- gint total_samples;
- int i, j;
-
/* FIXME: out of laziness, we copy the left-over bit from last buffer
* together with the incoming buffer to a new buffer to make the loop
* easy; this could be a lot more optimized though
diff --git a/gst/filter/gstfilter.c b/gst/filter/gstfilter.c
index 572d6475..36c37ec4 100644
--- a/gst/filter/gstfilter.c
+++ b/gst/filter/gstfilter.c
@@ -46,11 +46,11 @@ static struct _elements_entry _elements[] = {
static gboolean
plugin_init (GstPlugin * plugin)
{
+ gint i = 0;
+
/* initialize gst controller library */
gst_controller_init (NULL, NULL);
- gint i = 0;
-
while (_elements[i].name) {
if (!gst_element_register (plugin, _elements[i].name, GST_RANK_NONE,
_elements[i].type ()))
diff --git a/gst/filter/gstiir.c b/gst/filter/gstiir.c
index 45d217db..ab4dbd99 100644
--- a/gst/filter/gstiir.c
+++ b/gst/filter/gstiir.c
@@ -178,6 +178,9 @@ iir_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
GstIIR *this = GST_IIR (base);
GstClockTime timestamp;
+ gfloat *src;
+ int i;
+
/* don't process data in passthrough-mode */
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
@@ -188,9 +191,6 @@ iir_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
if (GST_CLOCK_TIME_IS_VALID (timestamp))
gst_object_sync_values (G_OBJECT (this), timestamp);
- gfloat *src;
- int i;
-
src = (gfloat *) GST_BUFFER_DATA (outbuf);
/* do an in-place edit */
diff --git a/gst/filter/gstlpwsinc.c b/gst/filter/gstlpwsinc.c
index 4a7b2679..c182a626 100644
--- a/gst/filter/gstlpwsinc.c
+++ b/gst/filter/gstlpwsinc.c
@@ -212,6 +212,13 @@ lpwsinc_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
GstLPWSinc *this = GST_LPWSINC (base);
GstClockTime timestamp;
+ gfloat *src;
+ gfloat *input;
+ int residue_samples;
+ gint input_samples;
+ gint total_samples;
+ int i, j;
+
/* don't process data in passthrough-mode */
if (gst_base_transform_is_passthrough (base))
return GST_FLOW_OK;
@@ -222,13 +229,6 @@ lpwsinc_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
if (GST_CLOCK_TIME_IS_VALID (timestamp))
gst_object_sync_values (G_OBJECT (this), timestamp);
- gfloat *src;
- gfloat *input;
- int residue_samples;
- gint input_samples;
- gint total_samples;
- int i, j;
-
/* FIXME: out of laziness, we copy the left-over bit from last buffer
* together with the incoming buffer to a new buffer to make the loop
* easy; this could be a lot more optimized though
diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc
index bc31b4a4..a4ae1486 100644
--- a/gst/modplug/gstmodplug.cc
+++ b/gst/modplug/gstmodplug.cc
@@ -217,7 +217,7 @@ gst_modplug_class_init (GstModPlugClass * klass)
"noise reduction", DEFAULT_NOISE_REDUCTION,
(GParamFlags) G_PARAM_READWRITE));
- gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_modplug_change_state);
+ gstelement_class->change_state = gst_modplug_change_state;
}
static void
diff --git a/gst/nuvdemux/gstnuvdemux.c b/gst/nuvdemux/gstnuvdemux.c
index 768af1ee..bf627570 100644
--- a/gst/nuvdemux/gstnuvdemux.c
+++ b/gst/nuvdemux/gstnuvdemux.c
@@ -231,12 +231,14 @@ static GstFlowReturn
gst_nuv_demux_header_load (GstNuvDemux * nuv, nuv_header ** h_ret)
{
GstBuffer *buffer = NULL;
- GstFlowReturn res = gst_nuv_demux_read_bytes (nuv, 72, TRUE, &buffer);
+ GstFlowReturn res;
+ nuv_header *h;
+ res = gst_nuv_demux_read_bytes (nuv, 72, TRUE, &buffer);
if (res != GST_FLOW_OK)
return res;
- nuv_header *h = g_new0 (nuv_header, 1);
+ h = g_new0 (nuv_header, 1);
memcpy (h->id, buffer->data, 12);
memcpy (h->version, buffer->data + 12, 5);
@@ -622,9 +624,10 @@ gst_nuv_demux_stream_extend_header (GstNuvDemux * nuv)
}
if (buf->data[0] == 'X') {
+ nuv_frame_header *h = NULL;
+
gst_buffer_unref (buf);
buf = NULL;
- nuv_frame_header *h = NULL;
res = gst_nuv_demux_frame_header_load (nuv, &h);
if (res != GST_FLOW_OK)