Merge branch '2.0release' into develop

pull/609/head
winlin 9 years ago
commit b463e4a2f4

@ -1040,11 +1040,6 @@ int SrsAvcAacCodec::avc_demux_sps_rbsp(char* rbsp, int nb_rbsp)
if ((ret = srs_avc_nalu_read_bit(&bs, seq_scaling_matrix_present_flag_i)) != ERROR_SUCCESS) { if ((ret = srs_avc_nalu_read_bit(&bs, seq_scaling_matrix_present_flag_i)) != ERROR_SUCCESS) {
return ret; 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;
}
} }
} }
} }
@ -1084,11 +1079,17 @@ int SrsAvcAacCodec::avc_demux_sps_rbsp(char* rbsp, int nb_rbsp)
if ((ret = srs_avc_nalu_read_uev(&bs, num_ref_frames_in_pic_order_cnt_cycle)) != ERROR_SUCCESS) { if ((ret = srs_avc_nalu_read_uev(&bs, num_ref_frames_in_pic_order_cnt_cycle)) != ERROR_SUCCESS) {
return ret; return ret;
} }
if (num_ref_frames_in_pic_order_cnt_cycle) { if (num_ref_frames_in_pic_order_cnt_cycle < 0) {
ret = ERROR_HLS_DECODE_ERROR; ret = ERROR_HLS_DECODE_ERROR;
srs_error("sps the num_ref_frames_in_pic_order_cnt_cycle invalid. ret=%d", ret); srs_error("sps the num_ref_frames_in_pic_order_cnt_cycle invalid. ret=%d", ret);
return ret; return ret;
} }
for (int i = 0; i < num_ref_frames_in_pic_order_cnt_cycle; i++) {
int32_t offset_for_ref_frame_i = -1;
if ((ret = srs_avc_nalu_read_uev(&bs, offset_for_ref_frame_i)) != ERROR_SUCCESS) {
return ret;
}
}
} }
int32_t max_num_ref_frames = -1; int32_t max_num_ref_frames = -1;

@ -77,7 +77,7 @@ int srs_avc_nalu_read_uev(SrsBitBuffer* stream, int32_t& v)
v = (1 << leadingZeroBits) - 1; v = (1 << leadingZeroBits) - 1;
for (int i = 0; i < leadingZeroBits; i++) { for (int i = 0; i < leadingZeroBits; i++) {
int32_t b = stream->read_bit(); int32_t b = stream->read_bit();
v += b << (leadingZeroBits - 1); v += b << (leadingZeroBits - 1 - i);
} }
return ret; return ret;

Loading…
Cancel
Save