Commit 9f33c640 authored by Ripinder Singh's avatar Ripinder Singh
Browse files

Fix for PI data writting assert failure in debug when no PI data is provided

parent 4ec6d74f
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -782,7 +782,7 @@ ivas_error IVAS_RTP_WriteNextFrame(
        return error;
    }

    while ( rtp->nWrittenPiData-- > 0 )
    while ( rtp->nWrittenPiData > 0 )
    {
        PIDATA_TS *piDataTs = &rtp->piData[nProcPiData++];
        if ( ( error = IVAS_RTP_PACK_PushPiData( rtp->hPack, (const IVAS_PIDATA_GENERIC *) &piDataTs->data ) ) != IVAS_ERR_OK )
@@ -790,6 +790,7 @@ ivas_error IVAS_RTP_WriteNextFrame(
            fprintf( stderr, "\nError %s while pushing scene orientation\n", ivas_error_to_string( error ) );
            return error;
        }
        rtp->nWrittenPiData--;
    }

    if ( forcePacket || IVAS_RTP_PACK_GetNumFrames( rtp->hPack ) == rtp->packCfg.maxFramesPerPacket )