[gst-devel] problem when getting the data of a frame
Vincent Torri
Vincent.Torri at iecn.u-nancy.fr
Tue Jul 19 14:35:51 CEST 2005
On Tue, 19 Jul 2005, Ronald S. Bultje wrote:
> Hi Vincent,
>
> On Tue, 2005-07-19 at 17:51, Vincent Torri wrote:
> > a) I seek to frame #n (with DEFAULT type, it works as it returns true)
> > b) I set the pipeline to PLAY state
> > c) I iterate ( while (iterate) { })
> > d) the calback is executed
> > 1) I set the state of the pipeline to PAUSED to stop the iteration
> > 2) I store the data of the buffer
> > e) I draw the Y plane in a .ppm file
>
> You don't own the data that you received in the handoff callback! So in
> order to keep it for later use, be sure to take a reference
> (gst_buffer_ref()) in step d2. After use, you can remove the reference
> again using gst_buffer_unref() (in step e).
>
> I'm surprised it doesn't crash. :).
I do reference the buffer ;) (and i unref it) It's not the problem :) I
wrap the buffer in a c++ class where the constructor ref the buffer and
the destructor unref it.
any other possible error ?
Vincent
More information about the gstreamer-devel
mailing list