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:
Gwenole Beauchesne 2013-01-30 18:58:01 +01:00
parent 2305b0db46
commit 4499f39274

View file

@ -697,10 +697,14 @@ gst_vaapi_decoder_get_surface(GstVaapiDecoder *decoder,
do {
frame = pop_frame(decoder);
if (frame) {
*out_proxy_ptr = gst_vaapi_surface_proxy_ref(frame->user_data);
while (frame) {
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);
return GST_VAAPI_DECODER_STATUS_SUCCESS;
frame = pop_frame(decoder);
}
status = decode_step(decoder);
} while (status == GST_VAAPI_DECODER_STATUS_SUCCESS);