/* enc_ptr_buf : Opus API manual: "The application must ensure this pointer remains valid until the next call to opus_repacketizer_init() or opus_repacketizer_destroy()." */
ret=opus_repacketizer_cat(rp,enc_ptr_buf,bytes);
if(ret!=OPUS_OK){
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR,"Opus encoder: error while repacketizing (cat) : %s !\n",opus_strerror(ret));
switch_goto_status(SWITCH_STATUS_GENERR,end);
}
enc_ptr_buf+=bytes;
total_len+=bytes;
}
/* this will never happen, unless there is a huge and unsupported number of frames */