summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-23 11:11:25 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-25 10:50:11 +0100
commit0e2d95f948c1eb0e1ee12da7fda9705405044bd6 (patch)
tree5ef8ccc796c07f54e9b1f3e5a417bdfe4514d6ee /gst-libs/gst
parentbd57dcb5fc0dbfbc341deedb101887fd3faff62b (diff)
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
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_vc1.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
index fb72920a..0234c5c9 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
@@ -797,7 +797,11 @@ fill_picture(GstVaapiDecoderVC1 *decoder, GstVaapiPicture *picture)
case GST_VAAPI_PICTURE_TYPE_B:
if (priv->next_picture)
pic_param->backward_reference_picture = priv->next_picture->surface_id;
- // fall-through
+ if (priv->prev_picture)
+ pic_param->forward_reference_picture = priv->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 (priv->prev_picture)
pic_param->forward_reference_picture = priv->prev_picture->surface_id;