After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 523985 - [PATCH] [identity] meta-writes buffers without meta-writable check
[PATCH] [identity] meta-writes buffers without meta-writable check
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.18
Other Linux
: Normal normal
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-23 14:22 UTC by Mark Nauwelaerts
Modified: 2008-04-03 15:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
always_in_place operation for identity (2.28 KB, patch)
2008-03-23 14:25 UTC, Mark Nauwelaerts
committed Details | Review

Description Mark Nauwelaerts 2008-03-23 14:22:38 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 ...
Comment 1 Mark Nauwelaerts 2008-03-23 14:25:03 UTC
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
Comment 2 Wim Taymans 2008-03-24 16:56:36 UTC
        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.