diff options
author | Jens Granseuer <jensgr@gmx.net> | 2007-01-03 16:41:10 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2007-01-03 16:41:10 +0000 |
commit | 9b1bffb45607c0cdfc80d1c856d331789789cd34 (patch) | |
tree | f1ffdcd24a18e07ee8d15bbfe4deabafd152cf61 /gst | |
parent | 2d4cbb090c60ed78e14c1a6e226c678570f4200a (diff) | |
download | gst-plugins-bad-9b1bffb45607c0cdfc80d1c856d331789789cd34.tar.gz gst-plugins-bad-9b1bffb45607c0cdfc80d1c856d331789789cd34.tar.bz2 gst-plugins-bad-9b1bffb45607c0cdfc80d1c856d331789789cd34.zip |
Fix build with gcc-2.x (declare variables at the beginning of a block etc.). Fixes #391971.
Original commit message from CVS:
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.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/filter/gstbpwsinc.c | 14 | ||||
-rw-r--r-- | gst/filter/gstfilter.c | 4 | ||||
-rw-r--r-- | gst/filter/gstiir.c | 6 | ||||
-rw-r--r-- | gst/filter/gstlpwsinc.c | 14 | ||||
-rw-r--r-- | gst/modplug/gstmodplug.cc | 2 | ||||
-rw-r--r-- | gst/nuvdemux/gstnuvdemux.c | 9 |
6 files changed, 26 insertions, 23 deletions
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) |