avcodec/dovi_rpuenc: Initialize bl_compat_id

Fixes: CID1596607 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.1
Michael Niedermayer 7 months ago
parent 2e16285fe8
commit c7075cdb67
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 8
      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;
}
}

Loading…
Cancel
Save