Commit 7344fd6c authored by vaclav's avatar vaclav
Browse files

port FIX_1388_MSAN_ivas_init_decoder

parent 6b75151f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@
#define NONBE_FIX_1297_SPAR_JBM_MEM_SAN                 /* Dolby: issue 1297, SPAR + JBM + BR switch memory sanitizer */
#define NONBE_1303_GRANULARITY_OSBA_REND                /* VA: issue 1303: Correctly set the granularity in OSBA, Disc mode, and BINAURAL_ROOM_REVERB output */
#define NONBE_1303_REND_GRANULARITY                     /* VA: issue 1303: Renderer granularity revision */
#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 */
+15 −0
Original line number Diff line number Diff line
@@ -1003,12 +1003,25 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
{
    ivas_error error;

#ifdef FIX_1388_MSAN_ivas_init_decoder
    test();
    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( EQ_16( hIvasDec->mode, IVAS_DEC_MODE_EVS ) )
        {
#ifdef FIX_1388_MSAN_ivas_init_decoder
            hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00;
            move32();

#endif
            IF( NE_32( ( error = ivas_init_decoder_fx( hIvasDec->st_ivas ) ), IVAS_ERR_OK ) )
            {
                return error;
@@ -1034,11 +1047,13 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
                hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = imult3216( hIvasDec->hVoIP->hCurrentDataUnit->dataSize, FRAMES_PER_SEC );
                move32();
            }
#ifndef FIX_1388_MSAN_ivas_init_decoder
            ELSE
            {
                hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00;
                move32();
            }
#endif
            hIvasDec->isInitialized = true;
            move16();
        }