mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 12:45:54 +00:00
vaapidecode: start the decoder task again after finishing
This allows the element to accept data again after draining without a hard reset or caps change happening in between. https://bugzilla.gnome.org/show_bug.cgi?id=734616
This commit is contained in:
parent
2af44842c6
commit
3b2e06be6c
1 changed files with 4 additions and 2 deletions
|
@ -500,8 +500,8 @@ gst_vaapidecode_finish(GstVideoDecoder *vdec)
|
||||||
|
|
||||||
/* Make sure the decode loop function has a chance to return, thus
|
/* Make sure the decode loop function has a chance to return, thus
|
||||||
possibly unlocking gst_video_decoder_finish_frame() */
|
possibly unlocking gst_video_decoder_finish_frame() */
|
||||||
decode->decoder_finish = TRUE;
|
|
||||||
if (decode->decoder_loop_status == GST_FLOW_OK) {
|
if (decode->decoder_loop_status == GST_FLOW_OK) {
|
||||||
|
decode->decoder_finish = TRUE;
|
||||||
GST_VIDEO_DECODER_STREAM_UNLOCK(vdec);
|
GST_VIDEO_DECODER_STREAM_UNLOCK(vdec);
|
||||||
g_mutex_lock(&decode->decoder_mutex);
|
g_mutex_lock(&decode->decoder_mutex);
|
||||||
while (decode->decoder_loop_status == GST_FLOW_OK)
|
while (decode->decoder_loop_status == GST_FLOW_OK)
|
||||||
|
@ -509,8 +509,10 @@ gst_vaapidecode_finish(GstVideoDecoder *vdec)
|
||||||
g_mutex_unlock(&decode->decoder_mutex);
|
g_mutex_unlock(&decode->decoder_mutex);
|
||||||
gst_pad_stop_task(GST_VAAPI_PLUGIN_BASE_SRC_PAD(decode));
|
gst_pad_stop_task(GST_VAAPI_PLUGIN_BASE_SRC_PAD(decode));
|
||||||
GST_VIDEO_DECODER_STREAM_LOCK(vdec);
|
GST_VIDEO_DECODER_STREAM_LOCK(vdec);
|
||||||
}
|
|
||||||
decode->decoder_finish = FALSE;
|
decode->decoder_finish = FALSE;
|
||||||
|
gst_pad_start_task(GST_VAAPI_PLUGIN_BASE_SRC_PAD(decode),
|
||||||
|
(GstTaskFunction)gst_vaapidecode_decode_loop, decode, NULL);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue