mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
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:
parent
2d4cbb090c
commit
9b1bffb456
8 changed files with 46 additions and 25 deletions
16
ChangeLog
16
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>
|
2007-01-02 Lutz Mueller <lutz@topfrose.de>
|
||||||
|
|
||||||
reviewed by: Edward Hervey <edward@fluendo.com>
|
reviewed by: Edward Hervey <edward@fluendo.com>
|
||||||
|
|
|
@ -806,8 +806,10 @@ gst_xvidenc_encode (GstXvidEnc * xvidenc, GstBuffer * buf,
|
||||||
gst_buffer_unref (outbuf);
|
gst_buffer_unref (outbuf);
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (ret > 0) { /* make sub-buffer */
|
} else if (ret > 0) { /* make sub-buffer */
|
||||||
|
GstBuffer *sub;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (xvidenc, "xvid produced output of size %d", ret);
|
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 */
|
/* parent no longer needed, will go away with child buffer */
|
||||||
gst_buffer_unref (outbuf);
|
gst_buffer_unref (outbuf);
|
||||||
|
@ -1059,10 +1061,10 @@ gst_xvidenc_get_property (GObject * object,
|
||||||
guint prop_id, GValue * value, GParamSpec * pspec)
|
guint prop_id, GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstXvidEnc *xvidenc;
|
GstXvidEnc *xvidenc;
|
||||||
|
guint offset;
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_XVIDENC (object));
|
g_return_if_fail (GST_IS_XVIDENC (object));
|
||||||
xvidenc = GST_XVIDENC (object);
|
xvidenc = GST_XVIDENC (object);
|
||||||
guint offset;
|
|
||||||
|
|
||||||
if (prop_id > xvidenc_prop_count) {
|
if (prop_id > xvidenc_prop_count) {
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
|
|
@ -256,6 +256,13 @@ bpwsinc_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
|
||||||
GstBPWSinc *this = GST_BPWSINC (base);
|
GstBPWSinc *this = GST_BPWSINC (base);
|
||||||
GstClockTime timestamp;
|
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 */
|
/* don't process data in passthrough-mode */
|
||||||
if (gst_base_transform_is_passthrough (base))
|
if (gst_base_transform_is_passthrough (base))
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
@ -266,13 +273,6 @@ bpwsinc_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
|
||||||
if (GST_CLOCK_TIME_IS_VALID (timestamp))
|
if (GST_CLOCK_TIME_IS_VALID (timestamp))
|
||||||
gst_object_sync_values (G_OBJECT (this), 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
|
/* 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
|
* together with the incoming buffer to a new buffer to make the loop
|
||||||
* easy; this could be a lot more optimized though
|
* easy; this could be a lot more optimized though
|
||||||
|
|
|
@ -46,11 +46,11 @@ static struct _elements_entry _elements[] = {
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
|
gint i = 0;
|
||||||
|
|
||||||
/* initialize gst controller library */
|
/* initialize gst controller library */
|
||||||
gst_controller_init (NULL, NULL);
|
gst_controller_init (NULL, NULL);
|
||||||
|
|
||||||
gint i = 0;
|
|
||||||
|
|
||||||
while (_elements[i].name) {
|
while (_elements[i].name) {
|
||||||
if (!gst_element_register (plugin, _elements[i].name, GST_RANK_NONE,
|
if (!gst_element_register (plugin, _elements[i].name, GST_RANK_NONE,
|
||||||
_elements[i].type ()))
|
_elements[i].type ()))
|
||||||
|
|
|
@ -178,6 +178,9 @@ iir_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
|
||||||
GstIIR *this = GST_IIR (base);
|
GstIIR *this = GST_IIR (base);
|
||||||
GstClockTime timestamp;
|
GstClockTime timestamp;
|
||||||
|
|
||||||
|
gfloat *src;
|
||||||
|
int i;
|
||||||
|
|
||||||
/* don't process data in passthrough-mode */
|
/* don't process data in passthrough-mode */
|
||||||
if (gst_base_transform_is_passthrough (base))
|
if (gst_base_transform_is_passthrough (base))
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
@ -188,9 +191,6 @@ iir_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
|
||||||
if (GST_CLOCK_TIME_IS_VALID (timestamp))
|
if (GST_CLOCK_TIME_IS_VALID (timestamp))
|
||||||
gst_object_sync_values (G_OBJECT (this), timestamp);
|
gst_object_sync_values (G_OBJECT (this), timestamp);
|
||||||
|
|
||||||
gfloat *src;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
src = (gfloat *) GST_BUFFER_DATA (outbuf);
|
src = (gfloat *) GST_BUFFER_DATA (outbuf);
|
||||||
|
|
||||||
/* do an in-place edit */
|
/* do an in-place edit */
|
||||||
|
|
|
@ -212,6 +212,13 @@ lpwsinc_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
|
||||||
GstLPWSinc *this = GST_LPWSINC (base);
|
GstLPWSinc *this = GST_LPWSINC (base);
|
||||||
GstClockTime timestamp;
|
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 */
|
/* don't process data in passthrough-mode */
|
||||||
if (gst_base_transform_is_passthrough (base))
|
if (gst_base_transform_is_passthrough (base))
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
@ -222,13 +229,6 @@ lpwsinc_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
|
||||||
if (GST_CLOCK_TIME_IS_VALID (timestamp))
|
if (GST_CLOCK_TIME_IS_VALID (timestamp))
|
||||||
gst_object_sync_values (G_OBJECT (this), 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
|
/* 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
|
* together with the incoming buffer to a new buffer to make the loop
|
||||||
* easy; this could be a lot more optimized though
|
* easy; this could be a lot more optimized though
|
||||||
|
|
|
@ -217,7 +217,7 @@ gst_modplug_class_init (GstModPlugClass * klass)
|
||||||
"noise reduction", DEFAULT_NOISE_REDUCTION,
|
"noise reduction", DEFAULT_NOISE_REDUCTION,
|
||||||
(GParamFlags) G_PARAM_READWRITE));
|
(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
|
static void
|
||||||
|
|
|
@ -231,12 +231,14 @@ static GstFlowReturn
|
||||||
gst_nuv_demux_header_load (GstNuvDemux * nuv, nuv_header ** h_ret)
|
gst_nuv_demux_header_load (GstNuvDemux * nuv, nuv_header ** h_ret)
|
||||||
{
|
{
|
||||||
GstBuffer *buffer = NULL;
|
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)
|
if (res != GST_FLOW_OK)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
nuv_header *h = g_new0 (nuv_header, 1);
|
h = g_new0 (nuv_header, 1);
|
||||||
|
|
||||||
memcpy (h->id, buffer->data, 12);
|
memcpy (h->id, buffer->data, 12);
|
||||||
memcpy (h->version, buffer->data + 12, 5);
|
memcpy (h->version, buffer->data + 12, 5);
|
||||||
|
@ -622,9 +624,10 @@ gst_nuv_demux_stream_extend_header (GstNuvDemux * nuv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf->data[0] == 'X') {
|
if (buf->data[0] == 'X') {
|
||||||
|
nuv_frame_header *h = NULL;
|
||||||
|
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
nuv_frame_header *h = NULL;
|
|
||||||
|
|
||||||
res = gst_nuv_demux_frame_header_load (nuv, &h);
|
res = gst_nuv_demux_frame_header_load (nuv, &h);
|
||||||
if (res != GST_FLOW_OK)
|
if (res != GST_FLOW_OK)
|
||||||
|
|
Loading…
Reference in a new issue