Commit 1ac30ad5 authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by GStreamer Marge Bot
Browse files

interlace: Drop framerate from query caps of sinkpad

Query caps should return caps which represent the element can accept,
not resulting format.

Fixing negotiation error with
gst-launch-1.0 videotestsrc ! video/x-raw,framerate=25/1 ! interlace field-pattern=0 ! fakesink

Part-of: <!2282>
parent da33921f
......@@ -980,18 +980,25 @@ gst_interlace_getcaps (GstPad * pad, GstInterlace * interlace, GstCaps * filter)
icaps = gst_caps_merge (icaps, alternate);
}
if (pattern == GST_INTERLACE_PATTERN_1_1) {
icaps =
gst_interlace_caps_double_framerate (icaps, (pad == interlace->srcpad),
FALSE);
} else if (pattern != GST_INTERLACE_PATTERN_2_2) {
GST_FIXME_OBJECT (interlace,
"Add calculations for telecine framerate conversions");
/* Drop framerate for sinkpad */
if (pad == interlace->sinkpad) {
for (i = 0; i < gst_caps_get_size (icaps); ++i) {
GstStructure *s = gst_caps_get_structure (icaps, i);
gst_structure_remove_field (s, "framerate");
}
} else {
if (pattern == GST_INTERLACE_PATTERN_1_1) {
icaps = gst_interlace_caps_double_framerate (icaps, TRUE, FALSE);
} else if (pattern != GST_INTERLACE_PATTERN_2_2) {
GST_FIXME_OBJECT (interlace,
"Add calculations for telecine framerate conversions");
for (i = 0; i < gst_caps_get_size (icaps); ++i) {
GstStructure *s = gst_caps_get_structure (icaps, i);
gst_structure_remove_field (s, "framerate");
}
}
}
if (clean_filter)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment