libs: decoder: h264: don't update cloned attributes

If the frame is a cloned picture, its PTS comes from its parent
picture.  In addition, the base decoder doesn't set a valid PTS to
the frame corresponding to the cloned picture.

https://bugzilla.gnome.org/show_bug.cgi?id=774254
This commit is contained in:
Hyunjun Ko 2017-01-10 13:49:27 +09:00 committed by Víctor Manuel Jáquez Leal
parent a1f7b5573d
commit 58e7b575bb

View file

@ -3258,10 +3258,17 @@ init_picture (GstVaapiDecoderH264 * decoder,
picture->frame_num = priv->frame_num;
picture->frame_num_wrap = priv->frame_num;
picture->output_flag = TRUE; /* XXX: conformant to Annex A only */
base_picture->pts = GST_VAAPI_DECODER_CODEC_FRAME (decoder)->pts;
base_picture->type = GST_VAAPI_PICTURE_TYPE_NONE;
base_picture->view_id = pi->view_id;
base_picture->voc = pi->voc;
/* If it's a cloned picture, it has some assignments from parent
* picture already. In addition, base decoder doesn't set valid pts
* to the frame corresponding to cloned picture.
*/
if (G_LIKELY (!base_picture->parent_picture)) {
base_picture->pts = GST_VAAPI_DECODER_CODEC_FRAME (decoder)->pts;
base_picture->type = GST_VAAPI_PICTURE_TYPE_NONE;
base_picture->view_id = pi->view_id;
base_picture->voc = pi->voc;
}
/* Initialize extensions */
switch (pi->nalu.extension_type) {