struct dpb_list {
struct list_head list;
struct pipe_video_buffer *buffer;
+ OMX_TICKS timestamp;
unsigned poc;
};
return;
vid_dec_NeedTarget(priv);
+ if (priv->first_buf_in_frame)
+ priv->timestamp = priv->timestamps[0];
+ priv->first_buf_in_frame = false;
if (!priv->codec) {
struct pipe_video_codec templat = {};
return NULL;
buf = result->buffer;
+ if (timestamp)
+ *timestamp = result->timestamp;
--priv->codec_data.h265.dpb_num;
LIST_DEL(&result->list);
struct pipe_video_buffer *tmp;
struct ref_pic_set *rps;
int i;
+ OMX_TICKS timestamp;
if (!priv->frame_started)
return;
if (!entry)
return;
+ priv->first_buf_in_frame = true;
entry->buffer = priv->target;
+ entry->timestamp = priv->timestamp;
entry->poc = get_poc(priv);
LIST_ADDTAIL(&entry->list, &priv->codec_data.h265.dpb_list);
return;
tmp = priv->in_buffers[0]->pInputPortPrivate;
- priv->in_buffers[0]->pInputPortPrivate = vid_dec_h265_Flush(priv, NULL);
+ priv->in_buffers[0]->pInputPortPrivate = vid_dec_h265_Flush(priv, ×tamp);
+ priv->in_buffers[0]->nTimeStamp = timestamp;
priv->target = tmp;
priv->frame_finished = priv->in_buffers[0]->pInputPortPrivate != NULL;
if (priv->frame_finished &&
priv->Decode = vid_dec_h265_Decode;
priv->EndFrame = vid_dec_h265_EndFrame;
priv->Flush = vid_dec_h265_Flush;
+ priv->first_buf_in_frame = true;
}