summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 34ed141)
raw | patch | inline | side by side (parent: 34ed141)
author | Olivier CrĂȘte <olivier.crete@collabora.com> | |
Mon, 4 Jul 2011 22:03:49 +0000 (18:03 -0400) | ||
committer | Nikhil Devshatwar <a0132237@ti.com> | |
Fri, 17 May 2013 09:40:35 +0000 (15:10 +0530) |
ext/x264/gstx264enc.c | patch | blob | history |
diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c
index 15dd190f1949c1769ac04ac757b62fa71d86858a..f3377bda982a9bbc9afc628b9a4be8e3ae102ae9 100644 (file)
--- a/ext/x264/gstx264enc.c
+++ b/ext/x264/gstx264enc.c
GstPad *peer;
GstCaps *caps;
GstPad *peer;
GstCaps *caps;
- /* If we already have caps return them */
- if (GST_PAD_CAPS (pad))
- return gst_caps_ref (GST_PAD_CAPS (pad));
-
encoder = GST_X264_ENC (gst_pad_get_parent (pad));
if (!encoder)
return gst_caps_new_empty ();
encoder = GST_X264_ENC (gst_pad_get_parent (pad));
if (!encoder)
return gst_caps_new_empty ();
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
}
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
}
+ /* If we already have caps return them */
+ if (GST_PAD_CAPS (pad) && gst_caps_can_intersect (GST_PAD_CAPS (pad), caps)) {
+ GstCaps *tmpcaps = gst_caps_copy (GST_PAD_CAPS (pad));
+
+ gst_caps_merge (tmpcaps, caps);
+ caps = tmpcaps;
+ }
+
gst_object_unref (encoder);
return caps;
gst_object_unref (encoder);
return caps;