mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
tests: simple-decoder: flush decoded frames at EOS.
Flush the remaining decoded frames when an end-of-stream is reached.
This commit is contained in:
parent
caee174e2f
commit
48b67470e3
1 changed files with 6 additions and 2 deletions
|
@ -233,7 +233,7 @@ decoder_thread(gpointer data)
|
||||||
RenderFrame *rfp;
|
RenderFrame *rfp;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
GstClockTime pts;
|
GstClockTime pts;
|
||||||
gboolean got_surface;
|
gboolean got_surface, got_eos = FALSE;
|
||||||
gint64 end_time;
|
gint64 end_time;
|
||||||
guint ofs;
|
guint ofs;
|
||||||
|
|
||||||
|
@ -282,7 +282,11 @@ decoder_thread(gpointer data)
|
||||||
/* nothing to do, just continue to the next iteration */
|
/* nothing to do, just continue to the next iteration */
|
||||||
break;
|
break;
|
||||||
case GST_VAAPI_DECODER_STATUS_END_OF_STREAM:
|
case GST_VAAPI_DECODER_STATUS_END_OF_STREAM:
|
||||||
|
gst_vaapi_decoder_flush(app->decoder);
|
||||||
|
if (got_eos)
|
||||||
goto send_eos;
|
goto send_eos;
|
||||||
|
got_eos = TRUE;
|
||||||
|
break;
|
||||||
case GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE:
|
case GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE:
|
||||||
end_time = g_get_monotonic_time() + G_TIME_SPAN_SECOND;
|
end_time = g_get_monotonic_time() + G_TIME_SPAN_SECOND;
|
||||||
g_mutex_lock(&app->mutex);
|
g_mutex_lock(&app->mutex);
|
||||||
|
|
Loading…
Reference in a new issue