History

avcodec/dovi_rpuenc: Initialize bl_compat_id

Fixes: CID1596607 Uninitialized scalar variable

Michael Niedermayer committed 2 years ago

Commit c7075cd1 parent 2e162851 file · +1 −7Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/dovi_rpuenc.c+1−7
@@ -57,7 +57,7 @@ int ff_dovi_configure(DOVIContext *s, AVCodecContext *avctx) · 56 unmodified lines
57 AVDOVIDecoderConfigurationRecord *cfg;57 AVDOVIDecoderConfigurationRecord *cfg;
58 const AVDOVIRpuDataHeader *hdr = NULL;58 const AVDOVIRpuDataHeader *hdr = NULL;
59 const AVFrameSideData *sd;59 const AVFrameSideData *sd;
60 int dv_profile, dv_level, bl_compat_id;60 int dv_profile, dv_level, bl_compat_id = -1;
61 size_t cfg_size;61 size_t cfg_size;
62 uint64_t pps;62 uint64_t pps;
63 63
@@ -94,9 +94,6 @@ int ff_dovi_configure(DOVIContext *s, AVCodecContext *avctx) · 30 unmodified lines
94 }94 }
95 95
96 switch (dv_profile) {96 switch (dv_profile) {
97 case 0: /* None */
98 bl_compat_id = -1;
99 break;
100 case 4: /* HEVC with enhancement layer */97 case 4: /* HEVC with enhancement layer */
101 case 7:98 case 7:
102 if (s->enable > 0) {99 if (s->enable > 0) {
@@ -130,9 +127,6 @@ int ff_dovi_configure(DOVIContext *s, AVCodecContext *avctx) · 27 unmodified lines
130 avctx->color_primaries == AVCOL_PRI_BT709 &&127 avctx->color_primaries == AVCOL_PRI_BT709 &&
131 avctx->color_trc == AVCOL_TRC_BT709) {128 avctx->color_trc == AVCOL_TRC_BT709) {
132 bl_compat_id = 2;129 bl_compat_id = 2;
133 } else {
134 /* Not a valid colorspace combination */
135 bl_compat_id = -1;
136 }130 }
137 }131 }
138 132

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t