caps: No need to require writable caps for _append/_merge second caps

The second caps ownership is transfered, no need to require it to
be writable from the caller function. Instead, _append and _merge
make it writable on their own.

Discovered because of an assertion on encoding-profile.c in
_get_input_caps using _merge but not passing writable caps.
This commit is contained in:
Thiago Santos 2011-10-21 10:23:04 -03:00
parent b046ba6e3a
commit 27ce89812a

View file

@ -583,7 +583,8 @@ gst_caps_append (GstCaps * caps1, GstCaps * caps2)
g_return_if_fail (GST_IS_CAPS (caps1));
g_return_if_fail (GST_IS_CAPS (caps2));
g_return_if_fail (IS_WRITABLE (caps1));
g_return_if_fail (IS_WRITABLE (caps2));
caps2 = gst_caps_make_writable (caps2);
#ifdef USE_POISONING
CAPS_POISON (caps2);
@ -625,7 +626,8 @@ gst_caps_merge (GstCaps * caps1, GstCaps * caps2)
g_return_if_fail (GST_IS_CAPS (caps1));
g_return_if_fail (GST_IS_CAPS (caps2));
g_return_if_fail (IS_WRITABLE (caps1));
g_return_if_fail (IS_WRITABLE (caps2));
caps2 = gst_caps_make_writable (caps2);
#ifdef USE_POISONING
CAPS_POISON (caps2);