After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742174 - vtenc_h264: potential deadlock upon EOS
vtenc_h264: potential deadlock upon EOS
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.4.5
Other Mac OS
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-01 12:22 UTC by Florian Zwoch
Modified: 2015-01-08 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix deadlock on EOS (808 bytes, patch)
2015-01-01 12:22 UTC, Florian Zwoch
committed Details | Review

Description Florian Zwoch 2015-01-01 12:22:37 UTC
Created attachment 293550 [details] [review]
fix deadlock on EOS

I experience deadlocks in the vtenc_h264 component when the element receives an EOS. It does not happen with every pipeline I create though.

After investigating a little  I _think_ I understood the problem. Simply because there was already a similar fix inside the code at a different location. So I reused the same thing and did a couple of tests. For me the patch completely removes the deadlocks completely.
Comment 1 Sebastian Dröge (slomo) 2015-01-08 13:48:59 UTC
Thanks for the patch! :) Please attach patches in "git format-patch" format in the future though, that way it will automatically include your name and a commit message.

commit 7d318a572c8c032336829a9afd2cda8c80d618e0
Author: Florian Zwoch <fzwoch@gmail.com>
Date:   Thu Jan 8 14:47:16 2015 +0100

    vtenc: Unlock the stream lock while waiting for pending frames to be completed in finish()
    
    We might otherwise deadlock because gst_vtenc_enqueue_buffer() can be
    called again and will take the stream lock again from another thread.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742174