diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c index f089aa2ff8..adad9c6abe 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c @@ -250,9 +250,11 @@ gst_vaapi_picture_output(GstVaapiPicture *picture) if (!picture->proxy) return FALSE; - proxy = g_object_ref(picture->proxy); - gst_vaapi_surface_proxy_set_timestamp(proxy, picture->pts); - gst_vaapi_decoder_push_surface_proxy(GET_DECODER(picture), proxy); + if (!GST_VAAPI_PICTURE_IS_SKIPPED(picture)) { + proxy = g_object_ref(picture->proxy); + gst_vaapi_surface_proxy_set_timestamp(proxy, picture->pts); + gst_vaapi_decoder_push_surface_proxy(GET_DECODER(picture), proxy); + } return TRUE; } diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h index 6566fec047..c53492dfa4 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h @@ -101,6 +101,9 @@ enum { #define GST_VAAPI_PICTURE_FLAG_SET GST_MINI_OBJECT_FLAG_SET #define GST_VAAPI_PICTURE_FLAG_UNSET GST_MINI_OBJECT_FLAG_UNSET +#define GST_VAAPI_PICTURE_IS_SKIPPED(picture) \ + GST_VAAPI_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_PICTURE_FLAG_SKIPPED) + #define GST_VAAPI_PICTURE_IS_REFERENCE(picture) \ GST_VAAPI_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_PICTURE_FLAG_REFERENCE) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c index d7d68121c2..63fbc7307b 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c @@ -933,8 +933,6 @@ decode_frame(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu) GST_VAAPI_PICTURE_FLAG_SET(picture, GST_VAAPI_PICTURE_FLAG_REFERENCE); break; case GST_VC1_PICTURE_TYPE_SKIPPED: - GST_VAAPI_PICTURE_FLAG_SET(picture, GST_VAAPI_PICTURE_FLAG_SKIPPED); - // fall-through case GST_VC1_PICTURE_TYPE_P: picture->type = GST_VAAPI_PICTURE_TYPE_P; GST_VAAPI_PICTURE_FLAG_SET(picture, GST_VAAPI_PICTURE_FLAG_REFERENCE);