gst_vaapi_picture_replace(&priv->current_picture, picture);
gst_vaapi_picture_unref(picture);
+ /* Update cropping rectangle */
+ do {
+ GstVC1AdvancedSeqHdr *adv_hdr;
+ GstVaapiRectangle crop_rect;
+
+ if (priv->profile != GST_VAAPI_PROFILE_VC1_ADVANCED)
+ break;
+
+ adv_hdr = &priv->seq_hdr.advanced;
+ if (!adv_hdr->display_ext)
+ break;
+
+ crop_rect.x = 0;
+ crop_rect.y = 0;
+ crop_rect.width = adv_hdr->disp_horiz_size;
+ crop_rect.height = adv_hdr->disp_vert_size;
+ if (crop_rect.width <= priv->width && crop_rect.height <= priv->height)
+ gst_vaapi_picture_set_crop_rect(picture, &crop_rect);
+ } while (0);
+
if (!gst_vc1_bitplanes_ensure_size(priv->bitplanes, &priv->seq_hdr)) {
GST_ERROR("failed to allocate bitplanes");
return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED;