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.
This commit is contained in:
Jens Granseuer 2007-01-03 16:41:10 +00:00 committed by Tim-Philipp Müller
parent 2d4cbb090c
commit 9b1bffb456
8 changed files with 46 additions and 25 deletions

View file

@ -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>

View file

@ -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);

View file

@ -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

View file

@ -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 ()))

View file

@ -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 */

View file

@ -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

View file

@ -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

View file

@ -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)