[Bug 787311] vtenc: leaks frames when shut down before EOS

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Sep 28 09:48:16 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=787311

--- Comment #26 from Nicola <lists at svrinformatica.it> ---
(In reply to Sebastian Dröge (slomo) from comment #25)
> Same also for the other patches. In videoencoder it doesn't take the lock

Hi Sebastian,

in videoencoder the lock is taken inside gst_video_encoder_flush:

https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/video/gstvideoencoder.c#n405

so the behaviour should be the same.

I think videoencoder is buggy here:

https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/video/gstvideoencoder.c#n1082

the lock is taken two times, this works since it is a recursive lock but for
encoder such as vtenc that could take the lock from another thread on flush
this will deadlock (not tested but it will deadlock for sure). 

I suggest to remove the lock from gst_video_encoder_flush and explictly use the
lock before calling flush, this is needed since flush can be chained with other
method and the whole operations should be atomic, what do you think about?

-- 
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