sys/v4l/gstv4lsrc.c (gst_v4lsrc_stop): Fix a spurious warning.

Original commit message from CVS:
2005-07-13  Andy Wingo  <wingo@pobox.com>

* sys/v4l/gstv4lsrc.c (gst_v4lsrc_stop): Fix a spurious warning.
(gst_v4lsrc_fixate): Fixate on format as well.
This commit is contained in:
Andy Wingo 2005-07-13 17:00:40 +00:00
parent d4ceba9d02
commit 7bfdb23652
2 changed files with 15 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2005-07-13 Andy Wingo <wingo@pobox.com>
* sys/v4l/gstv4lsrc.c (gst_v4lsrc_stop): Fix a spurious warning.
(gst_v4lsrc_fixate): Fixate on format as well.
* sys/xvimage/xvimagesink.c (gst_xvimage_buffer_destroy)
(gst_xvimagesink_xvimage_new): Ref the xvimagesink while the
buffer points to it.

View file

@ -232,6 +232,7 @@ gst_v4lsrc_fixate (GstPad * pad, GstCaps * caps)
for (i = 0; i < gst_caps_get_size (caps); ++i) {
structure = gst_caps_get_structure (caps, i);
const GValue *v;
gst_caps_structure_fixate_field_nearest_int (structure, "width",
targetwidth);
@ -239,6 +240,16 @@ gst_v4lsrc_fixate (GstPad * pad, GstCaps * caps)
targetheight);
gst_caps_structure_fixate_field_nearest_double (structure, "framerate",
7.5);
v = gst_structure_get_value (structure, "format");
if (G_VALUE_TYPE (v) != GST_TYPE_FOURCC) {
guint32 fourcc;
g_return_if_fail (G_VALUE_TYPE (v) == GST_TYPE_LIST);
fourcc = gst_value_get_fourcc (gst_value_list_get_value (v, 0));
gst_structure_set (structure, "format", GST_TYPE_FOURCC, fourcc, NULL);
}
}
}
@ -613,7 +624,7 @@ gst_v4lsrc_stop (GstBaseSrc * src)
{
GstV4lSrc *v4lsrc = GST_V4LSRC (src);
if (!gst_v4lsrc_capture_stop (v4lsrc))
if (GST_V4L_IS_ACTIVE (v4lsrc) && !gst_v4lsrc_capture_stop (v4lsrc))
return FALSE;
if (GST_V4LELEMENT (v4lsrc)->buffer != NULL) {