mirror of
https://github.com/nyanmisaka/mpp.git
synced 2026-01-24 03:20:38 +01:00
[fix]h265d: move set hdr dynamic meta to alloc current frame
tips:
if set this in alloc_frame, it may error and set the meta
in first missing ref frame, not in current frame.
Change-Id: I76ecadd7566e151b0795a4918efb4112881417ed
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This commit is contained in:
parent
047a3ff174
commit
9e2c67f02d
1 changed files with 6 additions and 4 deletions
|
|
@ -144,10 +144,7 @@ static HEVCFrame *alloc_frame(HEVCContext *s)
|
|||
mpp_frame_set_colorspace(frame->frame, s->h265dctx->colorspace);
|
||||
mpp_frame_set_mastering_display(frame->frame, s->mastering_display);
|
||||
mpp_frame_set_content_light(frame->frame, s->content_light);
|
||||
if (s->hdr_dynamic_meta && s->hdr_dynamic) {
|
||||
mpp_frame_set_hdr_dynamic_meta(frame->frame, s->hdr_dynamic_meta);
|
||||
s->hdr_dynamic = 0;
|
||||
}
|
||||
|
||||
h265d_dbg(H265D_DBG_GLOBAL, "poc %d w_stride %d h_stride %d\n",
|
||||
s->poc, s->h265dctx->coded_width, s->h265dctx->coded_height);
|
||||
ret = mpp_buf_slot_get_unused(s->slots, &frame->slot_index);
|
||||
|
|
@ -181,6 +178,11 @@ int mpp_hevc_set_new_ref(HEVCContext *s, MppFrame *mframe, int poc)
|
|||
mpp_err( "alloc_frame error\n");
|
||||
return MPP_ERR_NOMEM;
|
||||
}
|
||||
// set hdr dynamic meta
|
||||
if (s->hdr_dynamic_meta && s->hdr_dynamic) {
|
||||
mpp_frame_set_hdr_dynamic_meta(ref->frame, s->hdr_dynamic_meta);
|
||||
s->hdr_dynamic = 0;
|
||||
}
|
||||
|
||||
*mframe = ref->frame;
|
||||
s->ref = ref;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue