[FFmpeg-cvslog] avcodec/dovi_rpuenc: Initialize bl_compat_id

Michael Niedermayer git at videolan.org
Mon May 6 04:15:33 EEST 2024


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

avcodec/dovi_rpuenc: Initialize bl_compat_id

Fixes: CID1596607 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=c7075cdb676e217331d400bf2fb2c4a62268f649
---

 libavcodec/dovi_rpuenc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/libavcodec/dovi_rpuenc.c b/libavcodec/dovi_rpuenc.c
index 3feaa04b9e..ad03e143ee 100644
--- a/libavcodec/dovi_rpuenc.c
+++ b/libavcodec/dovi_rpuenc.c
@@ -57,7 +57,7 @@ int ff_dovi_configure(DOVIContext *s, AVCodecContext *avctx)
     AVDOVIDecoderConfigurationRecord *cfg;
     const AVDOVIRpuDataHeader *hdr = NULL;
     const AVFrameSideData *sd;
-    int dv_profile, dv_level, bl_compat_id;
+    int dv_profile, dv_level, bl_compat_id = -1;
     size_t cfg_size;
     uint64_t pps;
 
@@ -94,9 +94,6 @@ int ff_dovi_configure(DOVIContext *s, AVCodecContext *avctx)
     }
 
     switch (dv_profile) {
-    case 0: /* None */
-        bl_compat_id = -1;
-        break;
     case 4: /* HEVC with enhancement layer */
     case 7:
         if (s->enable > 0) {
@@ -130,9 +127,6 @@ int ff_dovi_configure(DOVIContext *s, AVCodecContext *avctx)
                    avctx->color_primaries == AVCOL_PRI_BT709 &&
                    avctx->color_trc == AVCOL_TRC_BT709) {
             bl_compat_id = 2;
-        } else {
-            /* Not a valid colorspace combination */
-            bl_compat_id = -1;
         }
     }
 



More information about the ffmpeg-cvslog mailing list