fix for opus memory allocation error by Fred, of radio panik
This commit is contained in:
parent
c57d870c73
commit
3f511ecda0
|
@ -240,7 +240,7 @@ OpusLibEncoder :: open ( void )
|
|||
strncpy(name, "Darkice Stream", 39);
|
||||
}
|
||||
tags[0].tag_len = strlen(titlestr) + strlen(name);
|
||||
tags[0].tag_str = (char*) malloc( tags[0].tag_len );
|
||||
tags[0].tag_str = (char*) malloc( tags[0].tag_len + 1 );
|
||||
if( tags[0].tag_str == NULL ) {
|
||||
throw Exception( __FILE__, __LINE__, "malloc failed");
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ struct OpusIdHeader {
|
|||
inline int buildPacket( unsigned char** packet) throw ( Exception ) {
|
||||
int i = 0;
|
||||
// FIXME - doesn't support multistream
|
||||
unsigned char* out = (unsigned char*)malloc(15);
|
||||
unsigned char* out = (unsigned char*)malloc(19);
|
||||
if( out == NULL ) {
|
||||
throw Exception( __FILE__, __LINE__, "cannot alloc buffer");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue