mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
vaapisink: fix support for raw YUV buffers.
If the raw YUV buffer was created from vaapisink, through the buffer_alloc() hook, then it will have a valid GstVaapiVideoMeta object attached to it. However, we previously assumed in that case that it was a "native" VA buffer, thus not calling into GstVaapiUploader::process().
This commit is contained in:
parent
2dcc9f19da
commit
6ce6712ed5
1 changed files with 6 additions and 2 deletions
|
@ -850,8 +850,6 @@ gst_vaapisink_show_frame(GstBaseSink *base_sink, GstBuffer *src_buffer)
|
|||
buffer = gst_vaapi_uploader_get_buffer(sink->uploader);
|
||||
if (!buffer)
|
||||
return GST_FLOW_UNEXPECTED;
|
||||
if (!gst_vaapi_uploader_process(sink->uploader, src_buffer, buffer))
|
||||
goto error;
|
||||
meta = gst_buffer_get_vaapi_video_meta(buffer);
|
||||
if (!meta)
|
||||
goto error;
|
||||
|
@ -859,6 +857,12 @@ gst_vaapisink_show_frame(GstBaseSink *base_sink, GstBuffer *src_buffer)
|
|||
else
|
||||
return GST_FLOW_UNEXPECTED;
|
||||
|
||||
if (sink->use_video_raw &&
|
||||
!gst_vaapi_uploader_process(sink->uploader, src_buffer, buffer)) {
|
||||
GST_WARNING("failed to process raw YUV buffer");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (sink->display != gst_vaapi_video_meta_get_display(meta)) {
|
||||
g_clear_object(&sink->display);
|
||||
sink->display = g_object_ref(gst_vaapi_video_meta_get_display(meta));
|
||||
|
|
Loading…
Reference in a new issue