status = GST_VAAPI_DECODER_GET_CLASS(decoder)->decode(decoder, buffer);
GST_DEBUG("decode frame (status = %d)", status);
- if (status == GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE) {
- *try_again = TRUE;
- }
if (status != GST_VAAPI_DECODER_STATUS_SUCCESS && GST_BUFFER_IS_EOS(buffer))
status = GST_VAAPI_DECODER_STATUS_END_OF_STREAM;
gst_buffer_unref(buffer);
gst_vaapi_decoder_get_surface(
GstVaapiDecoder *decoder,
GstVaapiDecoderStatus *pstatus,
- gboolean *try_again
+ gboolean try_again
)
{
GstVaapiSurfaceProxy *proxy;
proxy = pop_surface(decoder);
if (!proxy) {
do {
- status = decode_step(decoder, try_again);
+ status = decode_step(decoder, &try_again);
} while (status == GST_VAAPI_DECODER_STATUS_SUCCESS);
proxy = pop_surface(decoder);
}
gst_vaapi_decoder_get_surface(
GstVaapiDecoder *decoder,
GstVaapiDecoderStatus *pstatus,
- gboolean *try_again
+ gboolean try_again
);
void
gboolean try_again = FALSE;
for (;;) {
- proxy = gst_vaapi_decoder_get_surface(decode->decoder, &status, &try_again);
+ proxy = gst_vaapi_decoder_get_surface(decode->decoder, &status, try_again);
try_again = FALSE;
if (!proxy) {
if (status == GST_VAAPI_DECODER_STATUS_ERROR_NO_SURFACE) {
if (!gst_vaapi_decoder_put_buffer(decoder, NULL))
g_error("could not send EOS to the decoder");
- gboolean try_again = FALSE;
- proxy = gst_vaapi_decoder_get_surface(decoder, &status, &try_again);
+ proxy = gst_vaapi_decoder_get_surface(decoder, &status, FALSE);
if (!proxy)
g_error("could not get decoded surface (decoder status %d)", status);
if (!gst_vaapi_decoder_put_buffer(decoder, NULL))
g_error("could not send EOS to the decoder");
- gboolean try_again = FALSE;
- proxy = gst_vaapi_decoder_get_surface(decoder, &status, &try_again);
+ proxy = gst_vaapi_decoder_get_surface(decoder, &status, FALSE);
if (!proxy)
g_error("could not get decoded surface (decoder status %d)", status);