mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
drop script data except the onMetaData packet.
This commit is contained in:
parent
cc22ca4890
commit
04aa6f8296
3 changed files with 37 additions and 0 deletions
|
@ -275,6 +275,13 @@ int main(int argc, char** argv)
|
|||
// we only write some types of messages to flv file.
|
||||
int is_flv_msg = type == SRS_RTMP_TYPE_AUDIO
|
||||
|| type == SRS_RTMP_TYPE_VIDEO || type == SRS_RTMP_TYPE_SCRIPT;
|
||||
|
||||
// for script data, ignore except onMetaData
|
||||
if (type == SRS_RTMP_TYPE_SCRIPT) {
|
||||
if (!srs_rtmp_is_onMetaData(type, data, size)) {
|
||||
is_flv_msg = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (flv) {
|
||||
if (is_flv_msg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue