Mysterious issue with gst_buffer_make_writable.

Sebastian Dröge sebastian at centricular.com
Sat May 2 00:56:52 PDT 2015


On Mi, 2015-04-29 at 13:21 -0400, Stirling Westrup wrote:
> 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?

That's possible of course, but hard to know without a testcase :) But if
that's the case you should be able to easily create one now that
basically does what you described there.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150502/80ae80ca/attachment.sig>


More information about the gstreamer-devel mailing list