mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #433, fix the sps parse bug. 2.0.176
This commit is contained in:
parent
312366bba2
commit
438914c481
3 changed files with 15 additions and 5 deletions
|
@ -344,6 +344,7 @@ Remark:
|
|||
|
||||
### SRS 2.0 history
|
||||
|
||||
* v2.0, 2015-07-01, fix [#433](https://github.com/simple-rtmp-server/srs/issues/433) fix the sps parse bug. 2.0.176
|
||||
* v2.0, 2015-06-10, fix [#425](https://github.com/simple-rtmp-server/srs/issues/425) refine the time jitter, correct (-inf,-250)+(250,+inf) to 10ms. 2.0.175
|
||||
* v2.0, 2015-06-10, fix [#424](https://github.com/simple-rtmp-server/srs/issues/424) fix aggregate timestamp bug. 2.0.174
|
||||
* v2.0, 2015-06-06, fix [#421](https://github.com/simple-rtmp-server/srs/issues/421) drop video for unkown RTMP header.
|
||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
// current release version
|
||||
#define VERSION_MAJOR 2
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 175
|
||||
#define VERSION_REVISION 176
|
||||
|
||||
// server info.
|
||||
#define RTMP_SIG_SRS_KEY "SRS"
|
||||
|
|
|
@ -981,11 +981,11 @@ int SrsAvcAacCodec::avc_demux_sps_rbsp(char* rbsp, int nb_rbsp)
|
|||
}
|
||||
srs_info("sps parse profile=%d, level=%d, sps_id=%d", profile_idc, level_idc, seq_parameter_set_id);
|
||||
|
||||
int32_t chroma_format_idc = -1;
|
||||
if (profile_idc == 100 || profile_idc == 110 || profile_idc == 122 || profile_idc == 244
|
||||
|| profile_idc == 44 || profile_idc == 83 || profile_idc == 86 || profile_idc == 118
|
||||
|| profile_idc == 128
|
||||
) {
|
||||
int32_t chroma_format_idc = -1;
|
||||
if ((ret = srs_avc_nalu_read_uev(&bs, chroma_format_idc)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
@ -1016,9 +1016,18 @@ int SrsAvcAacCodec::avc_demux_sps_rbsp(char* rbsp, int nb_rbsp)
|
|||
return ret;
|
||||
}
|
||||
if (seq_scaling_matrix_present_flag) {
|
||||
ret = ERROR_HLS_DECODE_ERROR;
|
||||
srs_error("sps the seq_scaling_matrix_present_flag invalid. ret=%d", ret);
|
||||
return ret;
|
||||
int nb_scmpfs = ((chroma_format_idc != 3)? 8:12);
|
||||
for (int i = 0; i < nb_scmpfs; i++) {
|
||||
int8_t seq_scaling_matrix_present_flag_i = -1;
|
||||
if ((ret = srs_avc_nalu_read_bit(&bs, seq_scaling_matrix_present_flag_i)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
if (seq_scaling_matrix_present_flag_i) {
|
||||
ret = ERROR_HLS_DECODE_ERROR;
|
||||
srs_error("sps the seq_scaling_matrix_present_flag invalid, i=%d, nb_scmpfs=%d. ret=%d", i, nb_scmpfs, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue