mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
v4l2videodec: safely retrun from video_dec_loop with stream unlock
This is to avoid decoder hang when doing trick play between different resolutions. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1960>
This commit is contained in:
parent
5ca39060f4
commit
738dbf1cb7
1 changed files with 3 additions and 1 deletions
|
@ -655,8 +655,10 @@ gst_v4l2_video_dec_loop (GstVideoDecoder * decoder)
|
|||
if (g_atomic_int_get (&self->capture_configuration_change)) {
|
||||
gst_v4l2_object_stop (self->v4l2capture);
|
||||
ret = gst_v4l2_video_dec_setup_capture (decoder);
|
||||
if (ret != GST_FLOW_OK)
|
||||
if (ret != GST_FLOW_OK) {
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
return;
|
||||
}
|
||||
g_atomic_int_set (&self->capture_configuration_change, FALSE);
|
||||
}
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
|
|
Loading…
Reference in a new issue