Skip to content
  • He Junyan's avatar
    plugins: encode: fix a deadlock because of _drain() · 677d1e01
    He Junyan authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
    We call gst_vaapiencode_drain() in gst_vaapiencode_change_state(),
    whose context does not hold the stream lock of the encoder. The
    current gst_vaapiencode_drain inside unlock/lock pair adds a extra
    lock count to the stream lock of encoder and causes hang later.
    We just remove the gst_vaapiencode_drain() and expand its logic
    correctly according to the lock/unlock context.
    
    Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/433>
    677d1e01