Fixes: CID1596607 Uninitialized scalar variable
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -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 | ||