mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
add srs_rtmp_free_packet for srs-librtmp
This commit is contained in:
parent
7acc3aca16
commit
0e6f7e66f0
2 changed files with 11 additions and 0 deletions
|
@ -1116,6 +1116,11 @@ int srs_rtmp_write_packet(srs_rtmp_t rtmp, char type, u_int32_t timestamp, char*
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void srs_rtmp_free_packet(char* data)
|
||||||
|
{
|
||||||
|
srs_freepa(data);
|
||||||
|
}
|
||||||
|
|
||||||
srs_bool srs_rtmp_is_onMetaData(char type, char* data, int size)
|
srs_bool srs_rtmp_is_onMetaData(char type, char* data, int size)
|
||||||
{
|
{
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
|
@ -285,6 +285,7 @@ extern int srs_rtmp_bandwidth_check(srs_rtmp_t rtmp,
|
||||||
* FlvTagAudio, @see "E.4.2.1 AUDIODATA"
|
* FlvTagAudio, @see "E.4.2.1 AUDIODATA"
|
||||||
* FlvTagVideo, @see "E.4.3.1 VIDEODATA"
|
* FlvTagVideo, @see "E.4.3.1 VIDEODATA"
|
||||||
* FlvTagScript, @see "E.4.4.1 SCRIPTDATA"
|
* FlvTagScript, @see "E.4.4.1 SCRIPTDATA"
|
||||||
|
* User can free the packet by srs_rtmp_free_packet.
|
||||||
* @param size, size of packet.
|
* @param size, size of packet.
|
||||||
* @return the error code. 0 for success; otherwise, error.
|
* @return the error code. 0 for success; otherwise, error.
|
||||||
*
|
*
|
||||||
|
@ -302,6 +303,11 @@ extern int srs_rtmp_write_packet(srs_rtmp_t rtmp,
|
||||||
char type, u_int32_t timestamp, char* data, int size
|
char type, u_int32_t timestamp, char* data, int size
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free the packet allocated by srs_rtmp_read_packet.
|
||||||
|
*/
|
||||||
|
extern void srs_rtmp_free_packet(char* data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* whether type is script data and the data is onMetaData.
|
* whether type is script data and the data is onMetaData.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue