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

fix the avc codec bug, the ibmf format may like the annexb, we must guess only one time. 2.0.114

This commit is contained in:
winlin 2015-02-10 22:37:29 +08:00
parent 66931a8890
commit 87519aaae8
3 changed files with 48 additions and 10 deletions

View file

@ -358,6 +358,18 @@ public:
int add_sample_unit(char* bytes, int size);
};
/**
* the avc payload format, must be ibmf or annexb format.
* we guess by annexb first, then ibmf for the first time,
* and we always use the guessed format for the next time.
*/
enum SrsAvcPayloadFormat
{
SrsAvcPayloadFormatGuess = 0,
SrsAvcPayloadFormatAnnexb,
SrsAvcPayloadFormatIbmf,
};
/**
* the h264/avc and aac codec, for media stream.
*
@ -404,6 +416,9 @@ public:
char* sequenceParameterSetNALUnit;
u_int16_t pictureParameterSetLength;
char* pictureParameterSetNALUnit;
private:
// the avc payload format.
SrsAvcPayloadFormat payload_format;
public:
/**
* audio specified