mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
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 https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/912
This commit is contained in:
parent
ac1408874b
commit
60983fcea9
1 changed files with 8 additions and 3 deletions
|
@ -911,10 +911,15 @@ gst_nv_base_enc_stop_bitstream_thread (GstNvBaseEnc * nvenc, gboolean force)
|
||||||
g_async_queue_push (nvenc->bitstream_queue, SHUTDOWN_COOKIE);
|
g_async_queue_push (nvenc->bitstream_queue, SHUTDOWN_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* temporary unlock, so other thread can find and push frame */
|
if (!force) {
|
||||||
GST_VIDEO_ENCODER_STREAM_UNLOCK (nvenc);
|
/* temporary unlock during finish, so other thread can find and push frame */
|
||||||
|
GST_VIDEO_ENCODER_STREAM_UNLOCK (nvenc);
|
||||||
|
}
|
||||||
|
|
||||||
g_thread_join (nvenc->bitstream_thread);
|
g_thread_join (nvenc->bitstream_thread);
|
||||||
GST_VIDEO_ENCODER_STREAM_LOCK (nvenc);
|
|
||||||
|
if (!force)
|
||||||
|
GST_VIDEO_ENCODER_STREAM_LOCK (nvenc);
|
||||||
|
|
||||||
nvenc->bitstream_thread = NULL;
|
nvenc->bitstream_thread = NULL;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue