Skip to content

vaapiencode: Fixes deadlock in gst_vaapiencode_change_state function

This should fix #162 (closed)

I'm not sure if this is the right fix.

The problem is gst_vaapiencode_handle_frame locks waiting for available codedbufs. So when state is being changed from Paused to Ready and encoding task is stopped, no codedbufs are being returned to codedbuf_queue anymore, hence gst_vaapiencode_handle_frame never unlocks.

Then (parent_class)->change_state (PAUSED_TO_READY) locks waiting for the srcpad's chain function to complete, and chain function is waiting for new codedbufs, hence the deadlock.

Edited by Eugen Klim

Merge request reports