switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR,"[OGG/OPUS File] Invalid number of channels");
returnSWITCH_STATUS_FALSE;
}
if(ret<0){
switch(ret){
caseOP_HOLE:/* There was a hole in the data, and some samples may have been skipped. Call this function again to continue decoding past the hole.*/
caseOP_EREAD:/*An underlying read operation failed. This may signal a truncation attack from an <https:> source.*/
caseOP_EFAULT:/* An internal memory allocation failed. */
caseOP_EIMPL:/*An unseekable stream encountered a new link that used a feature that is not implemented, such as an unsupported channel family.*/
caseOP_EINVAL:/* The stream was only partially open. */
caseOP_ENOTFORMAT:/* An unseekable stream encountered a new link that did not have any logical Opus streams in it. */
caseOP_EBADHEADER:/*An unseekable stream encountered a new link with a required header packet that was not properly formatted, contained illegal values, or was missing altogether.*/
caseOP_EVERSION:/*An unseekable stream encountered a new link with an ID header that contained an unrecognized version number.*/
caseOP_EBADPACKET:/*Failed to properly decode the next packet.*/
caseOP_EBADLINK:/*We failed to find data we had seen before.*/
caseOP_EBADTIMESTAMP:/*An unseekable stream encountered a new link with a starting timestamp that failed basic validity checks.*/
default:
gotoerr;
break;
}
}elseif(ret==0){
/*The number of samples returned may be 0 if the buffer was too small to store even a single sample for both channels, or if end-of-file was reached*/