buffer: only warn if metadata is not writable when it should be, don't return as well

Make sure we execute the same code path in git versions and in releases,
so just warn when metadata isn't writable when we want it to be instead
of bailing out.
This commit is contained in:
Tim-Philipp Müller 2010-04-29 23:29:30 +01:00
parent ae56d71363
commit 8e932639ba

View file

@ -237,7 +237,7 @@ gst_buffer_copy_metadata (GstBuffer * dest, const GstBuffer * src,
#if GST_VERSION_NANO == 1 #if GST_VERSION_NANO == 1
/* we enable this extra debugging in git versions only for now */ /* we enable this extra debugging in git versions only for now */
g_return_if_fail (gst_buffer_is_metadata_writable (dest)); g_warn_if_fail (gst_buffer_is_metadata_writable (dest));
#endif #endif
GST_CAT_LOG (GST_CAT_BUFFER, "copy %p to %p", src, dest); GST_CAT_LOG (GST_CAT_BUFFER, "copy %p to %p", src, dest);
@ -487,7 +487,7 @@ gst_buffer_set_caps (GstBuffer * buffer, GstCaps * caps)
g_return_if_fail (buffer != NULL); g_return_if_fail (buffer != NULL);
#if GST_VERSION_NANO == 1 #if GST_VERSION_NANO == 1
/* we enable this extra debugging in git versions only for now */ /* we enable this extra debugging in git versions only for now */
g_return_if_fail (gst_buffer_is_metadata_writable (buffer)); g_warn_if_fail (gst_buffer_is_metadata_writable (buffer));
#endif #endif
gst_caps_replace (&GST_BUFFER_CAPS (buffer), caps); gst_caps_replace (&GST_BUFFER_CAPS (buffer), caps);