mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
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:
parent
a1f7b5573d
commit
58e7b575bb
1 changed files with 11 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue