This is a partial revert of f2ad6238e4c0e99e2fc131ee14c586e87b045680 It fixes per-frame color_trc signaling of arib-std-b67 frames.
Reproducible with: ffprobe -show_frames lg_4k_hlg.ts | grep color_transfer= --- libavcodec/hevcdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index c1de75abe1..e3d1e3f693 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2810,6 +2810,12 @@ static int set_side_data(HEVCContext *s) s->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; } + if (s->sei.alternative_transfer.present && + av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics) && + s->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) { + s->avctx->color_trc = out->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics; + } + for (int i = 0; i < s->sei.unregistered.nb_buf_ref; i++) { HEVCSEIUnregistered *unreg = &s->sei.unregistered; -- 2.26.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".