mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
Decode as many surfaces as possible in gst_vaapidecode_step().
This commit is contained in:
parent
a4d201aaf9
commit
a556e08e83
1 changed files with 30 additions and 28 deletions
|
@ -99,12 +99,13 @@ gst_vaapidecode_step(GstVaapiDecode *decode)
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
proxy = gst_vaapi_decoder_get_surface(decode->decoder, &status);
|
proxy = gst_vaapi_decoder_get_surface(decode->decoder, &status);
|
||||||
if (!proxy) {
|
if (!proxy) {
|
||||||
if (status != GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA)
|
if (status != GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA)
|
||||||
goto error_decode;
|
goto error_decode;
|
||||||
/* More data is needed */
|
/* More data is needed */
|
||||||
return GST_FLOW_OK;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer = NULL;
|
buffer = NULL;
|
||||||
|
@ -128,6 +129,7 @@ gst_vaapidecode_step(GstVaapiDecode *decode)
|
||||||
goto error_commit_buffer;
|
goto error_commit_buffer;
|
||||||
|
|
||||||
g_object_unref(proxy);
|
g_object_unref(proxy);
|
||||||
|
}
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
|
Loading…
Reference in a new issue