Commit 4a69a0ea authored by kinuthia's avatar kinuthia
Browse files

move code inside define & set value before malloc

parent 379638ea
Loading
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1580,9 +1580,8 @@ static void usage_dec( void )
#endif
    fprintf( stdout, "-exof File          : External orientation file for external orientation trajectory\n" );
#ifdef CONTROL_METADATA_DIRECTIVITY

    #endif
    fprintf( stdout, "-dpid ID            : Directivity pattern ID(s) (space-separated list of up to 4 numbers can be specified) for binaural output configuration\n" );
    #endif
#ifdef DEBUG_MODE_INFO
#ifdef DEBUG_MODE_INFO_TWEAK
    fprintf( stdout, "-info <folder>      : specify subfolder name for debug output\n" );
+1 −1
Original line number Diff line number Diff line
@@ -2723,6 +2723,7 @@ static void parseOption(
                args->directivityPatternId[i] = (int16_t) strtol( optionValues[i], NULL, 10 );
            }
            break;
#endif
#ifdef FIX_488_SYNC_DELAY
        case CmdLnOptionId_syncMdDelay:
            assert( numOptionValues == 1 );
@@ -2730,7 +2731,6 @@ static void parseOption(
            args->syncMdDelay = strtof( optionValues[0], NULL );
            break;
#endif
#endif
#ifdef CONTROL_METADATA_REVERB
        case CmdLnOptionId_acousticEnvironmentId:
            assert( numOptionValues == 1 );
+1 −1
Original line number Diff line number Diff line
@@ -1462,6 +1462,7 @@ static ivas_error RenderConfigReader_readBinary(
                }
                free( pRenderConfigReader->pFG );
            }
            pRenderConfigReader->nFG = nFG;
            if ( ( pRenderConfigReader->pFG = (FrequencyGrid *) malloc( pRenderConfigReader->nFG * sizeof( FrequencyGrid ) ) ) == NULL )
            {
                return IVAS_ERR_FAILED_ALLOC;
@@ -1471,7 +1472,6 @@ static ivas_error RenderConfigReader_readBinary(
                /* Initialize memory pointers to allow safe freeing ico errors */
                pRenderConfigReader->pFG[n].pFc = NULL;
            }
            pRenderConfigReader->nFG = nFG;
        }

        /* Loop through the frequency grids read from the binary stream */