mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
decoder: handle decode-only frames in raw API mode.
Fix gst_vaapi_decoder_get_surface() to only return frames with a valid surface proxy, i.e. with a valid VA surface. This means that any frame marked as decode-only is simply skipped.
This commit is contained in:
parent
2305b0db46
commit
4499f39274
1 changed files with 7 additions and 3 deletions
|
@ -697,10 +697,14 @@ gst_vaapi_decoder_get_surface(GstVaapiDecoder *decoder,
|
||||||
|
|
||||||
do {
|
do {
|
||||||
frame = pop_frame(decoder);
|
frame = pop_frame(decoder);
|
||||||
if (frame) {
|
while (frame) {
|
||||||
*out_proxy_ptr = gst_vaapi_surface_proxy_ref(frame->user_data);
|
if (!GST_VIDEO_CODEC_FRAME_IS_DECODE_ONLY(frame)) {
|
||||||
|
*out_proxy_ptr = gst_vaapi_surface_proxy_ref(frame->user_data);
|
||||||
|
gst_video_codec_frame_unref(frame);
|
||||||
|
return GST_VAAPI_DECODER_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
gst_video_codec_frame_unref(frame);
|
gst_video_codec_frame_unref(frame);
|
||||||
return GST_VAAPI_DECODER_STATUS_SUCCESS;
|
frame = pop_frame(decoder);
|
||||||
}
|
}
|
||||||
status = decode_step(decoder);
|
status = decode_step(decoder);
|
||||||
} while (status == GST_VAAPI_DECODER_STATUS_SUCCESS);
|
} while (status == GST_VAAPI_DECODER_STATUS_SUCCESS);
|
||||||
|
|
Loading…
Reference in a new issue