mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
Check if our inout buffer is still alive or default to a separate output buffer.
This commit is contained in:
parent
79c168751a
commit
c0462fe0c8
1 changed files with 5 additions and 6 deletions
|
@ -527,14 +527,13 @@ gst_vaapiconvert_prepare_output_buffer(
|
||||||
GstVaapiConvert * const convert = GST_VAAPICONVERT(trans);
|
GstVaapiConvert * const convert = GST_VAAPICONVERT(trans);
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
|
|
||||||
if (convert->use_inout_buffers) {
|
if (GST_VAAPI_IS_VIDEO_BUFFER(inbuf))
|
||||||
if (!GST_VAAPI_IS_VIDEO_BUFFER(inbuf)) {
|
|
||||||
GST_DEBUG("GstVaapiVideoBuffer was expected");
|
|
||||||
return GST_FLOW_UNEXPECTED;
|
|
||||||
}
|
|
||||||
buffer = gst_buffer_ref(inbuf);
|
buffer = gst_buffer_ref(inbuf);
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
|
if (convert->use_inout_buffers) {
|
||||||
|
GST_DEBUG("upstream element destroyed our inout buffer");
|
||||||
|
convert->use_inout_buffers = FALSE;
|
||||||
|
}
|
||||||
buffer = gst_vaapi_video_buffer_new_from_pool(convert->surfaces);
|
buffer = gst_vaapi_video_buffer_new_from_pool(convert->surfaces);
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
return GST_FLOW_UNEXPECTED;
|
return GST_FLOW_UNEXPECTED;
|
||||||
|
|
Loading…
Reference in a new issue