mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2282>
This commit is contained in:
parent
da33921f8d
commit
1ac30ad53f
1 changed files with 14 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue