diff options
author | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2015-11-16 18:22:14 +0200 |
---|---|---|
committer | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2015-11-16 18:22:14 +0200 |
commit | 26f895f4a833535f8dee16e2a556fb93cd504883 (patch) | |
tree | e6dfbbb4a24c27c2774a69dcd39ef703f40f28d9 | |
parent | 247896884b0d8dc4af4ab3290bac69b9a4e2784d (diff) | |
download | gst-vaapi-26f895f4a833535f8dee16e2a556fb93cd504883.tar.gz |
decoder: vp9: Fix ref picture update while doing repeat frame
Don't try to do frame decoding and reference picture update
while receiving a vp9 frame having show_existing_frame flag
set as TRUE.
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_vp9.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c index 5309c490..b97487a5 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c @@ -422,8 +422,12 @@ decode_picture (GstVaapiDecoderVp9 * decoder, const guchar * buf, GST_ERROR ("Failed to create clone picture"); return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED; } - is_clone_pic = TRUE; + + /* for cloned picture we should always unset the skip flag since + * the previously decoded frame might be decode-only but repeat-frame + * should make it ready for display */ + GST_VAAPI_PICTURE_FLAG_UNSET (picture, GST_VAAPI_PICTURE_FLAG_SKIPPED); } else { /* Create new picture */ picture = GST_VAAPI_PICTURE_NEW (VP9, decoder); @@ -472,16 +476,21 @@ decode_current_picture (GstVaapiDecoderVp9 * decoder) if (!picture) return GST_VAAPI_DECODER_STATUS_SUCCESS; + if (frame_hdr->show_existing_frame) + goto ret; + if (!gst_vaapi_picture_decode (picture)) goto error; update_ref_frames (decoder); +ret: if (frame_hdr->show_frame) if (!gst_vaapi_picture_output (picture)) goto error; gst_vaapi_picture_replace (&priv->current_picture, NULL); + return GST_VAAPI_DECODER_STATUS_SUCCESS; error: |