From 3eeff1786aa458356849db08859869078f1d7890 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Wed, 23 Jan 2013 11:11:25 +0100 Subject: [PATCH] vc1: handle CLOSED_ENTRY. When CLOSED_ENTRY == 0, and if the B pictures that follow an entry-point lack a reference anchor picture, these B pictures shall be discarded. https://bugs.freedesktop.org/show_bug.cgi?id=59505 --- gst-libs/gst/vaapi/gstvaapidecoder_vc1.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c index 4341560a2a..70fdb34714 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c @@ -787,7 +787,11 @@ fill_picture(GstVaapiDecoderVC1 *decoder, GstVaapiPicture *picture) case GST_VAAPI_PICTURE_TYPE_B: if (next_picture) pic_param->backward_reference_picture = next_picture->surface_id; - // fall-through + if (prev_picture) + pic_param->forward_reference_picture = prev_picture->surface_id; + else if (!priv->closed_entry) + GST_VAAPI_PICTURE_FLAG_SET(picture, GST_VAAPI_PICTURE_FLAG_SKIPPED); + break; case GST_VAAPI_PICTURE_TYPE_P: if (prev_picture) pic_param->forward_reference_picture = prev_picture->surface_id;