diff --git a/ChangeLog b/ChangeLog index 6733566553..d987eca700 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2007-01-03 Tim-Philipp Müller + + Patch by: Jens Granseuer + + * 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 reviewed by: Edward Hervey diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c index fb030f6032..e2cf4aa4ae 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 07175deedb..6f3e5cc780 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 572d6475aa..36c37ec4b0 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 45d217db50..ab4dbd99a9 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 4a7b267901..c182a626b8 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 bc31b4a485..a4ae14862c 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 768af1ee29..bf62757004 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)