summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/speed/demo-mp3.c2
-rw-r--r--gst/speed/gstspeed.c21
-rw-r--r--gst/tta/gstttadec.c12
-rw-r--r--gst/vbidec/vbidata.c4
-rw-r--r--gst/y4m/gsty4mencode.c4
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));