mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
update for caps api changes
This commit is contained in:
parent
807b7e50ef
commit
e8ba1ef94c
1 changed files with 5 additions and 3 deletions
|
@ -224,7 +224,7 @@ gst_monoscope_src_negotiate (GstMonoscope * monoscope)
|
||||||
{
|
{
|
||||||
GstCaps *othercaps, *target;
|
GstCaps *othercaps, *target;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
const GstCaps *templ;
|
GstCaps *templ;
|
||||||
GstQuery *query;
|
GstQuery *query;
|
||||||
GstBufferPool *pool = NULL;
|
GstBufferPool *pool = NULL;
|
||||||
guint size, min, max, prefix, alignment;
|
guint size, min, max, prefix, alignment;
|
||||||
|
@ -238,15 +238,17 @@ gst_monoscope_src_negotiate (GstMonoscope * monoscope)
|
||||||
if (othercaps) {
|
if (othercaps) {
|
||||||
target = gst_caps_intersect (othercaps, templ);
|
target = gst_caps_intersect (othercaps, templ);
|
||||||
gst_caps_unref (othercaps);
|
gst_caps_unref (othercaps);
|
||||||
|
gst_caps_unref (templ);
|
||||||
|
|
||||||
if (gst_caps_is_empty (target))
|
if (gst_caps_is_empty (target))
|
||||||
goto no_format;
|
goto no_format;
|
||||||
|
|
||||||
gst_caps_truncate (target);
|
target = gst_caps_truncate (target);
|
||||||
} else {
|
} else {
|
||||||
target = gst_caps_ref ((GstCaps *) templ);
|
target = templ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
target = gst_caps_make_writable (target);
|
||||||
structure = gst_caps_get_structure (target, 0);
|
structure = gst_caps_get_structure (target, 0);
|
||||||
gst_structure_fixate_field_nearest_int (structure, "width", 320);
|
gst_structure_fixate_field_nearest_int (structure, "width", 320);
|
||||||
gst_structure_fixate_field_nearest_int (structure, "height", 240);
|
gst_structure_fixate_field_nearest_int (structure, "height", 240);
|
||||||
|
|
Loading…
Reference in a new issue