mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-22 02:13:46 +00:00
C89 fixes: declare variables at the beginning of a block and
Original commit message from CVS: * ext/libpng/gstpngenc.c: (gst_pngenc_chain): * gst/avi/gstavidemux.c: (gst_avi_demux_invert): * gst/rtp/gstrtpmp4vdepay.c: (gst_rtp_mp4v_depay_setcaps): * gst/rtsp/sdpmessage.h: * gst/udp/gstdynudpsink.c: (gst_dynudpsink_render): * gst/udp/gstmultiudpsink.c: (gst_multiudpsink_get_stats): C89 fixes: declare variables at the beginning of a block and make gcc-2.9x happy (#328264; patch by: Jens Granseuer <jensgr at gmx dot net>).
This commit is contained in:
parent
2ecee9a43d
commit
f42029d79f
7 changed files with 22 additions and 9 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2006-01-23 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* ext/libpng/gstpngenc.c: (gst_pngenc_chain):
|
||||||
|
* gst/avi/gstavidemux.c: (gst_avi_demux_invert):
|
||||||
|
* gst/rtp/gstrtpmp4vdepay.c: (gst_rtp_mp4v_depay_setcaps):
|
||||||
|
* gst/rtsp/sdpmessage.h:
|
||||||
|
* gst/udp/gstdynudpsink.c: (gst_dynudpsink_render):
|
||||||
|
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_get_stats):
|
||||||
|
C89 fixes: declare variables at the beginning of a block and
|
||||||
|
make gcc-2.9x happy (#328264; patch by: Jens Granseuer
|
||||||
|
<jensgr at gmx dot net>).
|
||||||
|
|
||||||
2006-01-23 Jan Schmidt <thaytan@mad.scientist.com>
|
2006-01-23 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst/id3demux/id3tags.c: (id3demux_read_id3v2_tag):
|
* gst/id3demux/id3tags.c: (id3demux_read_id3v2_tag):
|
||||||
|
|
|
@ -323,9 +323,11 @@ gst_pngenc_chain (GstPad * pad, GstBuffer * buf)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
if (pngenc->snapshot) {
|
if (pngenc->snapshot) {
|
||||||
|
GstEvent *event;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (pngenc, "snapshot mode, sending EOS");
|
GST_DEBUG_OBJECT (pngenc, "snapshot mode, sending EOS");
|
||||||
/* send EOS event, since a frame has been pushed out */
|
/* send EOS event, since a frame has been pushed out */
|
||||||
GstEvent *event = gst_event_new_eos ();
|
event = gst_event_new_eos ();
|
||||||
|
|
||||||
ret = gst_pad_push_event (pngenc->srcpad, event);
|
ret = gst_pad_push_event (pngenc->srcpad, event);
|
||||||
|
|
||||||
|
|
|
@ -2219,10 +2219,10 @@ swap_line (guint8 * d1, guint8 * d2, guint8 * tmp, gint bytes)
|
||||||
static GstBuffer *
|
static GstBuffer *
|
||||||
gst_avi_demux_invert (avi_stream_context * stream, GstBuffer * buf)
|
gst_avi_demux_invert (avi_stream_context * stream, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
buf = gst_buffer_make_writable (buf);
|
|
||||||
gint y, h = stream->strf.vids->height, w = stream->strf.vids->width;
|
gint y, h = stream->strf.vids->height, w = stream->strf.vids->width;
|
||||||
guint8 *tmp = NULL;
|
guint8 *tmp = NULL;
|
||||||
|
|
||||||
|
buf = gst_buffer_make_writable (buf);
|
||||||
if (GST_BUFFER_SIZE (buf) < (w * h)) {
|
if (GST_BUFFER_SIZE (buf) < (w * h)) {
|
||||||
GST_WARNING ("Buffer is smaller than reported Width x Height");
|
GST_WARNING ("Buffer is smaller than reported Width x Height");
|
||||||
return buf;
|
return buf;
|
||||||
|
|
|
@ -132,13 +132,12 @@ gst_rtp_mp4v_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||||
GstRtpMP4VDepay *rtpmp4vdepay;
|
GstRtpMP4VDepay *rtpmp4vdepay;
|
||||||
GstCaps *srccaps;
|
GstCaps *srccaps;
|
||||||
const gchar *str;
|
const gchar *str;
|
||||||
|
gint clock_rate = 90000; /* default */
|
||||||
|
|
||||||
rtpmp4vdepay = GST_RTP_MP4V_DEPAY (depayload);
|
rtpmp4vdepay = GST_RTP_MP4V_DEPAY (depayload);
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
gint clock_rate = 90000; // default
|
|
||||||
|
|
||||||
if (gst_structure_has_field (structure, "clock-rate")) {
|
if (gst_structure_has_field (structure, "clock-rate")) {
|
||||||
gst_structure_get_int (structure, "clock-rate", &clock_rate);
|
gst_structure_get_int (structure, "clock-rate", &clock_rate);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ typedef struct {
|
||||||
gchar *start;
|
gchar *start;
|
||||||
gchar *stop;
|
gchar *stop;
|
||||||
gint n_repeat;
|
gint n_repeat;
|
||||||
gchar *repeat[];
|
gchar **repeat;
|
||||||
} SDPTime;
|
} SDPTime;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -187,6 +187,8 @@ gst_dynudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
GstNetBuffer *netbuf;
|
GstNetBuffer *netbuf;
|
||||||
struct sockaddr_in theiraddr;
|
struct sockaddr_in theiraddr;
|
||||||
|
guint16 destport;
|
||||||
|
guint32 destaddr;
|
||||||
|
|
||||||
memset (&theiraddr, 0, sizeof (theiraddr));
|
memset (&theiraddr, 0, sizeof (theiraddr));
|
||||||
|
|
||||||
|
@ -203,8 +205,6 @@ gst_dynudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
data = GST_BUFFER_DATA (netbuf);
|
data = GST_BUFFER_DATA (netbuf);
|
||||||
|
|
||||||
GST_DEBUG ("about to send %d bytes", size);
|
GST_DEBUG ("about to send %d bytes", size);
|
||||||
guint16 destport;
|
|
||||||
guint32 destaddr;
|
|
||||||
|
|
||||||
// let's get the address from the netbuffer
|
// let's get the address from the netbuffer
|
||||||
gst_netaddress_get_ip4_address (&netbuf->to, &destaddr, &destport);
|
gst_netaddress_get_ip4_address (&netbuf->to, &destaddr, &destport);
|
||||||
|
|
|
@ -462,10 +462,10 @@ gst_multiudpsink_get_stats (GstMultiUDPSink * sink, const gchar * host,
|
||||||
find = g_list_find_custom (sink->clients, &udpclient,
|
find = g_list_find_custom (sink->clients, &udpclient,
|
||||||
(GCompareFunc) client_compare);
|
(GCompareFunc) client_compare);
|
||||||
if (find) {
|
if (find) {
|
||||||
client = (GstUDPClient *) find->data;
|
|
||||||
|
|
||||||
GValue value = { 0 };
|
GValue value = { 0 };
|
||||||
|
|
||||||
|
client = (GstUDPClient *) find->data;
|
||||||
|
|
||||||
/* Result is a value array of (bytes_sent, packets_sent,
|
/* Result is a value array of (bytes_sent, packets_sent,
|
||||||
* connect_time, disconnect_time), all as uint64 */
|
* connect_time, disconnect_time), all as uint64 */
|
||||||
result = g_value_array_new (4);
|
result = g_value_array_new (4);
|
||||||
|
|
Loading…
Reference in a new issue