When decoding failed, or that the frame was dropped, the associated
surface proxy is not guaranteed to be present. Thus, the GST_DEBUG()
message needs to check whether the proxy is actually present or not.
https://bugzilla.gnome.org/show_bug.cgi?id=722403
[fixed gst_vaapi_surface_proxy_get_surface_id() to return VA_INVALID_ID]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
proxy = frame->user_data;
GST_DEBUG("dequeue decoded surface %" GST_VAAPI_ID_FORMAT,
- GST_VAAPI_ID_ARGS(GST_VAAPI_SURFACE_PROXY_SURFACE_ID(proxy)));
+ GST_VAAPI_ID_ARGS(gst_vaapi_surface_proxy_get_surface_id(proxy)));
return frame;
}
GstVaapiID
gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy)
{
- g_return_val_if_fail(proxy != NULL, 0);
- g_return_val_if_fail(proxy->surface != NULL, 0);
+ g_return_val_if_fail(proxy != NULL, VA_INVALID_ID);
+ g_return_val_if_fail(proxy->surface != NULL, VA_INVALID_ID);
return GST_VAAPI_SURFACE_PROXY_SURFACE_ID(proxy);
}