Commit c15538e3 authored by vaclav's avatar vaclav
Browse files

Merge branch...

Merge branch '2129-ref-PortMr2247-from-float-fix-msan-clang-18-use-of-uninitialized-value-in-ivas_init_decoder' into 'ivas-float-update'

Port MR2247 from float to FLP-ref - Fix [MSAN Clang 18] use-of-uninitialized value in ivas_init_decoder

See merge request !2408
parents e18ad133 11d706e7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -192,6 +192,7 @@
#define FIX_1384_MSAN_stereo_tcx_core_enc               /* VA: issue 1384: fix use-of-uninitialized value in stereo_tcx_core_enc() */
#define NONBE_1303_REND_GRANULARITY                     /* VA: issue 1303: Renderer granularity revision */
#define FIX_1384_MSAN_ivas_spar_dec_open                /* VA: issue 1386: fix use-of-uninitialized value in ivas_spar_dec_open() */
#define FIX_1388_MSAN_ivas_init_decoder                 /* VA: issue 1388: fix use-of-uninitialized value in ivas_init_decoder() */

// object-editing feature porting
#define OBJ_EDITING_API                                 /* object editing changes related to the API */
+14 −0
Original line number Diff line number Diff line
@@ -840,12 +840,24 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
{
    ivas_error error;

#ifdef FIX_1388_MSAN_ivas_init_decoder
    if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#endif

    if ( !hIvasDec->isInitialized )
    {
        /* Once first frame is fed, finish initialization in EVS Mono.
         * In IVAS mode, initialization is done in ivas_dec(). */
        if ( hIvasDec->mode == IVAS_DEC_MODE_EVS )
        {
#ifdef FIX_1388_MSAN_ivas_init_decoder
            hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00;

#endif
            if ( ( error = ivas_init_decoder( hIvasDec->st_ivas ) ) != IVAS_ERR_OK )
            {
                return error;
@@ -858,10 +870,12 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
                st->prev_use_partial_copy = 0;
                hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = hIvasDec->hVoIP->hCurrentDataUnit->dataSize * FRAMES_PER_SEC;
            }
#ifndef FIX_1388_MSAN_ivas_init_decoder
            else
            {
                hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00;
            }
#endif
            hIvasDec->isInitialized = true;
        }
    }