Message ID | 20240912005925.10151-9-jamrial@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,01/10,v4] avutil/frame: add an LCEVC enhancement data payload side data type | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/hevc/refs.c b/libavcodec/hevc/refs.c index 09d759f936..a75153c462 100644 --- a/libavcodec/hevc/refs.c +++ b/libavcodec/hevc/refs.c @@ -86,6 +86,19 @@ static HEVCFrame *alloc_frame(HEVCContext *s, HEVCLayerContext *l) if (frame->f) continue; + ret = ff_progress_frame_alloc(s->avctx, &frame->tf); + if (ret < 0) + return NULL; + + // Add LCEVC SEI metadata here, as it's needed in get_buffer() + if (s->sei.common.lcevc.info) { + HEVCSEILCEVC *lcevc = &s->sei.common.lcevc; + ret = ff_frame_new_side_data_from_buf(s->avctx, frame->tf.f, + AV_FRAME_DATA_LCEVC, &lcevc->info); + if (ret < 0) + goto fail; + } + ret = ff_progress_frame_get_buffer(s->avctx, &frame->tf, AV_GET_BUFFER_FLAG_REF); if (ret < 0)
Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/hevc/refs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)