summaryrefslogtreecommitdiffstats
path: root/gst/speed
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2005-05-05 15:59:18 +0000
committerTim-Philipp Müller <tim@centricular.net>2005-05-05 15:59:18 +0000
commit49f86d3ee6242be6f324edc2cbf36089ff5a2640 (patch)
tree00f7711bb5c6d060ba5e98e7f283e93b266663ae /gst/speed
parent0a6d60fb2008570a8797946cc71beb16dcb70a91 (diff)
downloadgst-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/speed')
-rw-r--r--gst/speed/demo-mp3.c2
-rw-r--r--gst/speed/gstspeed.c21
2 files changed, 15 insertions, 8 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