diff --git a/README.md b/README.md index 00f63b7c7..000332310 100755 --- a/README.md +++ b/README.md @@ -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. diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index f8fbee7ef..edfbf462a 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -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" diff --git a/trunk/src/kernel/srs_kernel_codec.cpp b/trunk/src/kernel/srs_kernel_codec.cpp index 0436c25fa..a1ebf4a13 100644 --- a/trunk/src/kernel/srs_kernel_codec.cpp +++ b/trunk/src/kernel/srs_kernel_codec.cpp @@ -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; + } + } } }