[FFmpeg-cvslog] avcodec/dovi_rpuenc: initialize profile

Michael Niedermayer git at videolan.org
Mon May 13 05:26:12 EEST 2024


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri May  3 22:28:16 2024 +0200| [46ad68084e4b1bb1c8f822a7252ce7351a17bac7] | committer: Michael Niedermayer

avcodec/dovi_rpuenc: initialize profile

Code is taken from dovi_rpudec

Fixes: CID1596604 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46ad68084e4b1bb1c8f822a7252ce7351a17bac7
---

 libavcodec/dovi_rpuenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/dovi_rpuenc.c b/libavcodec/dovi_rpuenc.c
index ad03e143ee..5a482a7a6e 100644
--- a/libavcodec/dovi_rpuenc.c
+++ b/libavcodec/dovi_rpuenc.c
@@ -565,6 +565,8 @@ int ff_dovi_rpu_generate(DOVIContext *s, const AVDOVIMetadata *metadata,
     set_ue_golomb(pb, vdr_rpu_id);
     s->mapping = &s->vdr[vdr_rpu_id]->mapping;
 
+    profile = s->cfg.dv_profile ? s->cfg.dv_profile : ff_dovi_guess_profile_hevc(hdr);
+
     if (!use_prev_vdr_rpu) {
         set_ue_golomb(pb, mapping->mapping_color_space);
         set_ue_golomb(pb, mapping->mapping_chroma_format_idc);



More information about the ffmpeg-cvslog mailing list