vc1: fix next POC for new sequence layers.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 22 Jan 2013 08:30:04 +0000 (09:30 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 22 Jan 2013 08:30:04 +0000 (09:30 +0100)
Fix next POC when a new sequence layer is reached. At this point, we
need to reset any previous reference picture, i.e. non B-frame.

gst-libs/gst/vaapi/gstvaapidecoder_vc1.c

index 81ab154..7baf02e 100644 (file)
@@ -248,6 +248,13 @@ decode_sequence(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu)
 
     priv->has_entrypoint = FALSE;
 
+    /* Reset POC */
+    if (priv->last_non_b_picture) {
+        if (priv->last_non_b_picture->poc == priv->next_poc)
+            priv->next_poc++;
+        gst_vaapi_picture_replace(&priv->last_non_b_picture, NULL);
+    }
+
     /* Validate profile */
     switch (seq_hdr->profile) {
     case GST_VC1_PROFILE_SIMPLE: