1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix the bug of flv stream, metadata type should be 18

This commit is contained in:
winlin 2015-03-10 17:04:02 +08:00
parent 0ff49fd299
commit 5c3c38684b
4 changed files with 7 additions and 5 deletions

View file

@ -36,6 +36,7 @@ using namespace std;
#include <srs_kernel_error.hpp>
#include <srs_kernel_stream.hpp>
#include <srs_kernel_file.hpp>
#include <srs_kernel_codec.hpp>
#define SRS_FLV_TAG_HEADER_SIZE 11
#define SRS_FLV_PREVIOUS_TAG_SIZE 4
@ -149,7 +150,7 @@ int SrsFlvEncoder::write_audio(int64_t timestamp, char* data, int size)
// 11bytes tag header
static char tag_header[] = {
(char)8, // TagType UB [5], 8 = audio
(char)SrsCodecFlvTagAudio, // TagType UB [5], 8 = audio
(char)0x00, (char)0x00, (char)0x00, // DataSize UI24 Length of the message.
(char)0x00, (char)0x00, (char)0x00, // Timestamp UI24 Time in milliseconds at which the data in this tag applies.
(char)0x00, // TimestampExtended UI8
@ -183,7 +184,7 @@ int SrsFlvEncoder::write_video(int64_t timestamp, char* data, int size)
// 11bytes tag header
static char tag_header[] = {
(char)9, // TagType UB [5], 9 = video
(char)SrsCodecFlvTagVideo, // TagType UB [5], 9 = video
(char)0x00, (char)0x00, (char)0x00, // DataSize UI24 Length of the message.
(char)0x00, (char)0x00, (char)0x00, // Timestamp UI24 Time in milliseconds at which the data in this tag applies.
(char)0x00, // TimestampExtended UI8