mirror of
https://github.com/nyanmisaka/mpp.git
synced 2026-01-24 01:20:40 +01:00
fix[h265d]: Ensure the DTS is transmitted to the frame
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com> Change-Id: Ic950a1c4f9ab8d7c54d699773f7a0629fe04fb3d
This commit is contained in:
parent
c70028a976
commit
3e54310f7f
3 changed files with 4 additions and 0 deletions
|
|
@ -1990,6 +1990,7 @@ MPP_RET h265d_prepare(void *ctx, MppPacket pkt, HalDecTask *task)
|
|||
s->checksum_buf_size = split_size;
|
||||
h265d_dbg(H265D_DBG_TIME, "split frame get pts %lld", sc->pts);
|
||||
s->pts = sc->pts;
|
||||
s->dts = sc->dts;
|
||||
s->eos = (s->eos && (mpp_packet_get_length(pkt) < 4)) ? 1 : 0;
|
||||
} else {
|
||||
return MPP_FAIL_SPLIT_FRAME;
|
||||
|
|
@ -1997,6 +1998,7 @@ MPP_RET h265d_prepare(void *ctx, MppPacket pkt, HalDecTask *task)
|
|||
} else {
|
||||
pos = buf + length;
|
||||
s->pts = pts;
|
||||
s->dts = dts;
|
||||
mpp_packet_set_pos(pkt, pos);
|
||||
if (s->eos && !length) {
|
||||
task->valid = 0;
|
||||
|
|
|
|||
|
|
@ -641,6 +641,7 @@ typedef struct HEVCContext {
|
|||
void *hal_pic_private;
|
||||
|
||||
RK_S64 pts;
|
||||
RK_S64 dts;
|
||||
RK_U8 has_get_eos;
|
||||
RK_U8 miss_ref_flag;
|
||||
RK_U8 pre_pps_id;
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ static HEVCFrame *alloc_frame(HEVCContext *s)
|
|||
mpp_frame_set_errinfo(frame->frame, 0);
|
||||
mpp_frame_set_discard(frame->frame, 0);
|
||||
mpp_frame_set_pts(frame->frame, s->pts);
|
||||
mpp_frame_set_dts(frame->frame, s->dts);
|
||||
mpp_frame_set_poc(frame->frame, s->poc);
|
||||
mpp_frame_set_color_range(frame->frame, s->h265dctx->color_range);
|
||||
mpp_frame_set_color_primaries(frame->frame, s->sps->vui.colour_primaries);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue