summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4048a6)
raw | patch | inline | side by side (parent: c4048a6)
author | Luciana Fujii Pontello <luciana.fujii@collabora.co.uk> | |
Sun, 1 Apr 2012 02:34:19 +0000 (22:34 -0400) | ||
committer | Luciana Fujii Pontello <luciana.fujii@collabora.co.uk> | |
Sun, 1 Apr 2012 02:34:19 +0000 (22:34 -0400) |
For yuv-strided formats we need to add the rowstride field with the
allowed range to make caps intersect properly.
allowed range to make caps intersect properly.
src/gstducatividdec.c | patch | blob | history |
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index 36f04a00691fa74e8873b39de2b0a978758bd559..e06023e7db8e6a324589b6b1a08fabc6f1f65967 100644 (file)
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
ret = gst_pad_set_caps (self->srcpad, outcaps);
- GST_INFO_OBJECT (self, "set caps done %d, %"GST_PTR_FORMAT,
- ret, outcaps);
+ GST_INFO_OBJECT (self, "set caps done %d, %" GST_PTR_FORMAT, ret, outcaps);
out:
if (outcaps)
for (i = 0; i < gst_caps_get_size (caps); i++) {
GstStructure *structure;
GstStructure *modified_structure;
+ GValue value = { 0 };
structure = gst_caps_get_structure (caps, i);
gst_caps_append_structure (outcaps, gst_structure_copy (structure));
if (gst_structure_has_name (structure, "video/x-raw-yuv")) {
gst_structure_set_name (modified_structure, "video/x-raw-yuv-strided");
+ g_value_init (&value, GST_TYPE_INT_RANGE);
+ gst_value_set_int_range (&value, 0, G_MAXINT);
+ gst_structure_set_value (modified_structure, "rowstride", &value);
gst_caps_append_structure (outcaps, modified_structure);
+ g_value_unset (&value);
} else {
gst_structure_set_name (modified_structure, "video/x-raw-yuv");
gst_structure_remove_field (modified_structure, "rowstride");
GstDucatiVidDecClass *klass = GST_DUCATIVIDDEC_GET_CLASS (self);
GST_DEBUG_OBJECT (self, "query: %" GST_PTR_FORMAT, query);
- res = klass->query(self, pad, query, &forward);
+ res = klass->query (self, pad, query, &forward);
if (res && forward)
res = gst_pad_query_default (pad, query);