Mysterious issue with gst_buffer_make_writable.

Stirling Westrup swestrup at gmail.com
Wed Apr 29 10:21:33 PDT 2015


On Wed, Apr 22, 2015 at 9:42 AM, Sebastian Dröge <sebastian at centricular.com>
wrote:

> On Mo, 2015-04-20 at 11:29 -0400, Stirling Westrup wrote:
> > Right now we have a piece of code in a transformation element where we
> call
> >
> > buffer = gst_buffer_make_writable(buffer);
> >
> > Where that line appears to corrupt something such that, after passing on
> > the buffer, when it eventually gets used and unrefed, we get an assertion
> > error that its not a valid buffer.
> >
> > However, if we replace that line with
> >
> > if( !gst_buffer_is_writable(buffer) )
> >  GST_ERROR("Oh Noes!");
> >
> > then everything works fine. Any idea what could be going on?
>
> Do you have a testcase for reproducing this? Only thing I can think of
> is that you don't actually own a reference to that buffer there.
>

We've managed to work out that it happens when we have a fair number (often
9 or 25) tasks all trying to set the same buffer writable at the exact same
moment. Could there be a some kind of racing or locking issue there?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150429/ee7b93b7/attachment-0001.html>


More information about the gstreamer-devel mailing list