mirror of https://bitbucket.org/ausocean/av.git
not giving c stuff go pointers
This commit is contained in:
parent
88c2104048
commit
e6aefb2e65
|
@ -65,12 +65,16 @@ unsigned int RTMP_start_session(char* url, uint connect_timeout){
|
|||
}
|
||||
|
||||
unsigned int RTMP_write_frame(char* data, uint data_length){
|
||||
dataForC = malloc(data_length);
|
||||
memcpy(dataForC,data,data_length);
|
||||
if (!RTMP_IsConnected(rtmp)) {
|
||||
printf("RTMP is not connected!\n");
|
||||
free(dataForC);
|
||||
return 0;
|
||||
}
|
||||
if (!RTMP_Write(rtmp, (const char*)data, data_length)) {
|
||||
printf("RTMP write error!\n");
|
||||
free(dataForC);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue