diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2005-05-05 15:59:18 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2005-05-05 15:59:18 +0000 |
commit | 49f86d3ee6242be6f324edc2cbf36089ff5a2640 (patch) | |
tree | 00f7711bb5c6d060ba5e98e7f283e93b266663ae /gst | |
parent | 0a6d60fb2008570a8797946cc71beb16dcb70a91 (diff) | |
download | gst-plugins-bad-49f86d3ee6242be6f324edc2cbf36089ff5a2640.tar.gz gst-plugins-bad-49f86d3ee6242be6f324edc2cbf36089ff5a2640.tar.bz2 gst-plugins-bad-49f86d3ee6242be6f324edc2cbf36089ff5a2640.zip |
gst/: gcc-4.0 fixes part one
Original commit message from CVS:
* gst/speed/demo-mp3.c: (time_tick_cb):
* gst/speed/gstspeed.c: (speed_parse_caps):
* gst/subparse/gstsubparse.c: (get_next_line),
(gst_subparse_buffer_format_autodetect),
(gst_subparse_format_autodetect), (gst_subparse_loop),
(gst_subparse_type_find):
* gst/tags/gstid3tag.c: (gst_tag_list_new_from_id3v1):
* gst/tags/gstvorbistag.c:
(gst_tag_list_from_vorbiscomment_buffer), (gst_vorbis_tag_chain):
* gst/tcp/gstmultifdsink.c: (gst_multifdsink_client_queue_data),
(gst_multifdsink_client_queue_caps),
(gst_multifdsink_client_queue_buffer):
* gst/tcp/gsttcpserversink.c:
(gst_tcpserversink_handle_server_read):
* gst/tcp/gsttcpsink.c: (gst_tcpsink_sink_link):
* gst/tcp/gsttcpsrc.c: (gst_tcpsrc_get):
* gst/tta/gstttadec.c: (gst_tta_dec_link):
* gst/typefind/gsttypefindfunctions.c: (mp3_type_find),
(qt_type_find):
* gst/udp/gstudpsink.c: (gst_udpsink_sink_link):
* gst/udp/gstudpsrc.c: (gst_udpsrc_get):
* gst/vbidec/vbidata.c: (vbidata_process_frame):
* gst/videomixer/videomixer.c: (gst_videomixer_pad_sinkconnect):
* gst/videotestsrc/videotestsrc.c: (gst_videotestsrc_smpte),
(gst_videotestsrc_snow), (gst_videotestsrc_black),
(paint_setup_I420), (paint_setup_YV12), (paint_setup_YUY2),
(paint_setup_UYVY), (paint_setup_YVYU), (paint_setup_IYU2),
(paint_setup_Y41B), (paint_setup_Y42B), (paint_setup_Y800),
(paint_setup_YVU9), (paint_setup_YUV9), (paint_setup_xRGB8888),
(paint_setup_xBGR8888), (paint_setup_RGBx8888),
(paint_setup_BGRx8888), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
* gst/volenv/gstvolenv.c: (gst_volenv_chain):
* gst/wavenc/gstwavenc.c: (gst_wavenc_setup),
(gst_wavenc_sinkconnect):
* gst/y4m/gsty4mencode.c: (gst_y4mencode_chain):
gcc-4.0 fixes part one
Diffstat (limited to 'gst')
-rw-r--r-- | gst/speed/demo-mp3.c | 2 | ||||
-rw-r--r-- | gst/speed/gstspeed.c | 21 | ||||
-rw-r--r-- | gst/tta/gstttadec.c | 12 | ||||
-rw-r--r-- | gst/vbidec/vbidata.c | 4 | ||||
-rw-r--r-- | gst/y4m/gsty4mencode.c | 4 |
5 files changed, 27 insertions, 16 deletions
diff --git a/gst/speed/demo-mp3.c b/gst/speed/demo-mp3.c index d2144cf3..f26acff2 100644 --- a/gst/speed/demo-mp3.c +++ b/gst/speed/demo-mp3.c @@ -39,7 +39,7 @@ static gboolean time_tick_cb (GstElement * audiosink) { GstFormat format = GST_FORMAT_TIME; - guint64 total, pos; + gint64 total, pos; if (gst_element_query (audiosink, GST_QUERY_TOTAL, &format, &total) && gst_element_query (audiosink, GST_QUERY_POSITION, &format, &pos)) { diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c index edb23be9..0d26ad71 100644 --- a/gst/speed/gstspeed.c +++ b/gst/speed/gstspeed.c @@ -116,7 +116,7 @@ speed_parse_caps (GstSpeed * filter, const GstCaps * caps) { const gchar *mimetype; GstStructure *structure; - gboolean ret; + gint rate, chans, width, buffer_frames; g_return_val_if_fail (filter != NULL, FALSE); g_return_val_if_fail (caps != NULL, FALSE); @@ -131,12 +131,19 @@ speed_parse_caps (GstSpeed * filter, const GstCaps * caps) else return FALSE; - ret = gst_structure_get_int (structure, "rate", &filter->rate); - ret &= gst_structure_get_int (structure, "channels", &filter->channels); - ret &= gst_structure_get_int (structure, "width", &filter->width); + if (!gst_structure_get_int (structure, "rate", &rate) + || !gst_structure_get_int (structure, "width", &width) + || !gst_structure_get_int (structure, "channels", &chans)) + return FALSE; + + filter->rate = rate; + filter->width = width; + filter->channels = chans; - filter->buffer_frames = 0; - gst_structure_get_int (structure, "buffer-frames", &filter->buffer_frames); + if (gst_structure_get_int (structure, "buffer-frames", &buffer_frames)) + filter->buffer_frames = buffer_frames; + else + filter->buffer_frames = 0; if (filter->format == GST_SPEED_FORMAT_FLOAT) { filter->sample_size = filter->channels * filter->width / 8; @@ -145,7 +152,7 @@ speed_parse_caps (GstSpeed * filter, const GstCaps * caps) filter->sample_size = filter->channels * filter->width / 8; } - return ret; + return TRUE; } GType diff --git a/gst/tta/gstttadec.c b/gst/tta/gstttadec.c index c550e7cd..947527ec 100644 --- a/gst/tta/gstttadec.c +++ b/gst/tta/gstttadec.c @@ -107,14 +107,18 @@ gst_tta_dec_link (GstPad * pad, const GstCaps * caps) GstStructure *structure = gst_caps_get_structure (caps, 0); GstCaps *srccaps; guint64 outsize; - guint bits; + gint bits, chans, samplerate; if (!gst_caps_is_fixed (caps)) return GST_PAD_LINK_DELAYED; - gst_structure_get_int (structure, "rate", &ttadec->samplerate); - gst_structure_get_int (structure, "channels", &ttadec->channels); - gst_structure_get_int (structure, "width", &bits); + if (!gst_structure_get_int (structure, "rate", &samplerate) + || !gst_structure_get_int (structure, "channels", &chans) + || !gst_structure_get_int (structure, "width", &bits)) + return GST_PAD_LINK_REFUSED; + + ttadec->samplerate = samplerate; + ttadec->channels = chans; ttadec->bytes = bits / 8; srccaps = gst_caps_new_simple ("audio/x-raw-int", diff --git a/gst/vbidec/vbidata.c b/gst/vbidec/vbidata.c index 87b90ea4..b1be7893 100644 --- a/gst/vbidec/vbidata.c +++ b/gst/vbidec/vbidata.c @@ -1181,8 +1181,8 @@ vbidata_process_frame (vbidata_t * vbi, int printdebug) return; } - ProcessLine (vbi, &vbi->buf[DO_LINE * 2048], 0); - ProcessLine (vbi, &vbi->buf[(16 + DO_LINE) * 2048], 1); + ProcessLine (vbi, (unsigned char *) &vbi->buf[DO_LINE * 2048], 0); + ProcessLine (vbi, (unsigned char *) &vbi->buf[(16 + DO_LINE) * 2048], 1); } void diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c index f70f101a..8560ff86 100644 --- a/gst/y4m/gsty4mencode.c +++ b/gst/y4m/gsty4mencode.c @@ -213,9 +213,9 @@ gst_y4mencode_chain (GstPad * pad, GstData * _data) header = "FRAME\n"; } - snprintf (GST_BUFFER_DATA (outbuf), 255, header, + g_snprintf ((gchar *) GST_BUFFER_DATA (outbuf), 255, header, filter->width, filter->height, filter->fps_idx); - len = strlen (GST_BUFFER_DATA (outbuf)); + len = strlen ((gchar *) GST_BUFFER_DATA (outbuf)); memcpy (GST_BUFFER_DATA (outbuf) + len, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); |