Commit 592f0cf0 authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by Tim-Philipp Müller

nvenc: Don't release stream lock on GstVideoEncoder::stop()

baseclass didn't take the stream lock during stop. It's valid only for
GstVideoEncoder::finish()

Closes #912
parent e1e2ff98
......@@ -925,10 +925,15 @@ gst_nv_base_enc_stop_bitstream_thread (GstNvBaseEnc * nvenc, gboolean force)
g_async_queue_push (nvenc->bitstream_queue, SHUTDOWN_COOKIE);
}
/* temporary unlock, so other thread can find and push frame */
GST_VIDEO_ENCODER_STREAM_UNLOCK (nvenc);
if (!force) {
/* temporary unlock during finish, so other thread can find and push frame */
GST_VIDEO_ENCODER_STREAM_UNLOCK (nvenc);
}
g_thread_join (nvenc->bitstream_thread);
GST_VIDEO_ENCODER_STREAM_LOCK (nvenc);
if (!force)
GST_VIDEO_ENCODER_STREAM_LOCK (nvenc);
nvenc->bitstream_thread = NULL;
return TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment