GNOME Bugzilla – Bug 523985
[PATCH] [identity] meta-writes buffers without meta-writable check
Last modified: 2008-04-03 15:18:12 UTC
In single-segment or data-rate "mode", identity modifies time metadata of passing buffers. As identity configures basetransform for passthrough mode, no preparation of input buffers is performed, and so buffer metadata may be modified without _is_metadata_writable verification. Rather, it seems that identity should not use basetransform in passthrough mode, but in always_in_place mode and implement a _prepare_output_buffer. In fact, identity is given as a use-case example for such behaviour in basetransform documentation, so something is not ok either way ...
Created attachment 107870 [details] [review] always_in_place operation for identity * Use basetransform in always_in_place mode (rather than passthrough) * Implement prepare_output_buffer
Patch by: Mark Nauwelaerts <manauw at skynet be> * plugins/elements/gstidentity.c: (gst_identity_class_init), (gst_identity_init), (gst_identity_prepare_output_buffer): Identity is not always a passthrough element, it can modify the buffer timestamps when it has a datarate and operates in single-segment mode. We therefore make it an in_place filter with a custom buffer prepare function that conditionally makes the input buffer metadata writable when needed. Fixes #523985.