[Bug 722345] directfb: video sink crashes when used with ext_surface

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Jan 20 06:51:37 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=722345
  GStreamer | gst-plugins-bad | 1.2.2

--- Comment #30 from Eric <etrousset at awox.com> 2014-01-20 14:51:32 UTC ---
(In reply to comment #29)
> (In reply to comment #27)
> > (In reply to comment #26)
> > > You probably have to keep an additional reference of the last rendered buffer
> > > in the sink, and only release it (and give it back to the pool and let it be
> > > used upstream) after the next buffer is rendered.
> > 
> > I'm afraid I don't get it!
> > Do you mean I should keep pointer to the rendered buffer and unref the n-1 one?
> 
> I meant that your render function looks like this:
> 
> render(sink, buf) {
>   if (sink->last_buffer)
>     gst_buffer_unref(sink->last_buffer);
>   sink->last_buffer = gst_buffer_ref(buf);
>   do_dfb_stuff_to_render(buf);
> }

This will lead to reallocating a buffer for each frame whereas we could just
keep switch between two preallocated buffers linked to the two buffers of the
double buffer surface. (If I am clear :p)

I can manage to do thing at first if I flip the surface in the allocation code
so that the next one is linked to the second buffer. Now that I am writing this
I think I understand what is wrong with my code. When reallocating due to frame
size change, I don't need to flip the surface cause it will be Flipped by the
rendering process....  

I guess I'll have to add a test to see if we are playing or something like that

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list