mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +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 */
|
||||
caps = gst_caps_intersect (thiscaps, peercaps);
|
||||
GST_DEBUG_OBJECT (basesrc, "intersect: %" GST_PTR_FORMAT, caps);
|
||||
gst_caps_unref (thiscaps);
|
||||
gst_caps_unref (peercaps);
|
||||
} else {
|
||||
/* no peer, work with our own caps then */
|
||||
caps = thiscaps;
|
||||
caps = gst_caps_copy (thiscaps);
|
||||
}
|
||||
gst_caps_unref (thiscaps);
|
||||
if (caps) {
|
||||
/* take first (and best, since they are sorted) possibility */
|
||||
caps = gst_caps_make_writable (caps);
|
||||
gst_caps_truncate (caps);
|
||||
|
||||
/* now fixate */
|
||||
|
|
Loading…
Reference in a new issue