1
0
Fork 0
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:
winlin 2015-01-17 13:23:30 +08:00
parent cc22ca4890
commit 04aa6f8296
3 changed files with 37 additions and 0 deletions

View file

@ -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) {