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

fix #474, config to donot parse width/height from sps. 2.0.189

This commit is contained in:
winlin 2015-09-14 18:36:44 +08:00
parent eb578b4a39
commit 511627abab
10 changed files with 94 additions and 11 deletions

View file

@ -382,6 +382,8 @@ int SrsCodecSample::add_sample_unit(char* bytes, int size)
SrsAvcAacCodec::SrsAvcAacCodec()
{
avc_parse_sps = true;
width = 0;
height = 0;
duration = 0;
@ -939,6 +941,12 @@ int SrsAvcAacCodec::avc_demux_sps_rbsp(char* rbsp, int nb_rbsp)
{
int ret = ERROR_SUCCESS;
// we donot parse the detail of sps.
// @see https://github.com/simple-rtmp-server/srs/issues/474
if (!avc_parse_sps) {
return ret;
}
// reparse the rbsp.
SrsStream stream;
if ((ret = stream.initialize(rbsp, nb_rbsp)) != ERROR_SUCCESS) {

View file

@ -605,6 +605,9 @@ public:
*/
int aac_extra_size;
char* aac_extra_data;
public:
// for sequence header, whether parse the h.264 sps.
bool avc_parse_sps;
public:
SrsAvcAacCodec();
virtual ~SrsAvcAacCodec();