buffer: don't clear TAG on NULL buffer

When the buffer fails to copy, don't clear the TAG on the NULL pointer.
This commit is contained in:
Wim Taymans 2014-03-24 16:11:30 +01:00
parent a6decb91ac
commit ee348fe7cb

View file

@ -519,7 +519,8 @@ _gst_buffer_copy (GstBuffer * buffer)
if (!gst_buffer_copy_into (copy, buffer, GST_BUFFER_COPY_ALL, 0, -1))
gst_buffer_replace (&copy, NULL);
GST_BUFFER_FLAG_UNSET (copy, GST_BUFFER_FLAG_TAG_MEMORY);
if (copy)
GST_BUFFER_FLAG_UNSET (copy, GST_BUFFER_FLAG_TAG_MEMORY);
return copy;
}