mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
basesrc: avoid some caps manipulation
After the intersect we have writable caps. Copy the template caps so that also there we have writable caps.
This commit is contained in:
parent
e50267593e
commit
a82b607885
1 changed files with 2 additions and 3 deletions
|
@ -2596,15 +2596,14 @@ gst_base_src_default_negotiate (GstBaseSrc * basesrc)
|
||||||
/* get intersection */
|
/* get intersection */
|
||||||
caps = gst_caps_intersect (thiscaps, peercaps);
|
caps = gst_caps_intersect (thiscaps, peercaps);
|
||||||
GST_DEBUG_OBJECT (basesrc, "intersect: %" GST_PTR_FORMAT, caps);
|
GST_DEBUG_OBJECT (basesrc, "intersect: %" GST_PTR_FORMAT, caps);
|
||||||
gst_caps_unref (thiscaps);
|
|
||||||
gst_caps_unref (peercaps);
|
gst_caps_unref (peercaps);
|
||||||
} else {
|
} else {
|
||||||
/* no peer, work with our own caps then */
|
/* no peer, work with our own caps then */
|
||||||
caps = thiscaps;
|
caps = gst_caps_copy (thiscaps);
|
||||||
}
|
}
|
||||||
|
gst_caps_unref (thiscaps);
|
||||||
if (caps) {
|
if (caps) {
|
||||||
/* take first (and best, since they are sorted) possibility */
|
/* take first (and best, since they are sorted) possibility */
|
||||||
caps = gst_caps_make_writable (caps);
|
|
||||||
gst_caps_truncate (caps);
|
gst_caps_truncate (caps);
|
||||||
|
|
||||||
/* now fixate */
|
/* now fixate */
|
||||||
|
|
Loading…
Reference in a new issue