mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
GB: Fix PSM parsing indicator bug. v5.0.134 (#3383)
PICK a78936f517
Co-authored-by: pengfei.ma <pengfei.ma@ctechm.com>
Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
parent
a4e7427433
commit
9bf45bea01
3 changed files with 10 additions and 8 deletions
|
@ -8,6 +8,7 @@ The changelog for SRS.
|
|||
|
||||
## SRS 5.0 Changelog
|
||||
|
||||
* v5.0, 2023-01-17, Merge [#3383](https://github.com/ossrs/srs/pull/3383): GB: Fix PSM parsing indicator bug. v5.0.134 (#3383)
|
||||
* v5.0, 2023-01-08, Merge [#3308](https://github.com/ossrs/srs/pull/3308): DVR: Improve file write performance by fwrite with cache. v5.0.133
|
||||
* v5.0, 2023-01-06, DVR: Support blackbox test based on hooks. v5.0.132
|
||||
* v5.0, 2023-01-06, FFmpeg: Support build with FFmpeg native opus. v5.0.131 (#3140)
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 133
|
||||
#define VERSION_REVISION 134
|
||||
|
||||
#endif
|
||||
|
|
|
@ -427,17 +427,18 @@ srs_error_t SrsPsPsmPacket::decode(SrsBuffer* stream)
|
|||
return srs_error_new(ERROR_GB_PS_HEADER, "requires 4 only %d bytes", stream->left());
|
||||
}
|
||||
|
||||
uint16_t r0 = stream->read_2bytes();
|
||||
if ((r0&0x01) != 0x01) {
|
||||
return srs_error_new(ERROR_GB_PS_HEADER, "invalid marker of 0x%#x", r0);
|
||||
}
|
||||
|
||||
program_stream_map_version_ = (uint8_t)(r0&0x1f);
|
||||
current_next_indicator_ = (uint8_t)((r0>>7) & 0x01);
|
||||
uint8_t r0 = stream->read_1bytes();
|
||||
program_stream_map_version_ = r0&0x1f;
|
||||
current_next_indicator_ = (r0>>7) & 0x01;
|
||||
if (!current_next_indicator_) {
|
||||
return srs_error_new(ERROR_GB_PS_HEADER, "invalid indicator of 0x%#x", r0);
|
||||
}
|
||||
|
||||
uint8_t r1 = stream->read_1bytes();
|
||||
if ((r1&0x01) != 0x01) {
|
||||
return srs_error_new(ERROR_GB_PS_HEADER, "invalid marker of 0x%#x", r1);
|
||||
}
|
||||
|
||||
program_stream_info_length_ = stream->read_2bytes();
|
||||
if (!stream->require(program_stream_info_length_)) {
|
||||
return srs_error_new(ERROR_GB_PS_HEADER, "requires %d only %d bytes", program_stream_info_length_, stream->left());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue