diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 1bf281120..9ac20d745 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -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) diff --git a/trunk/src/core/srs_core_version5.hpp b/trunk/src/core/srs_core_version5.hpp index e4df652eb..11c6f1a90 100644 --- a/trunk/src/core/srs_core_version5.hpp +++ b/trunk/src/core/srs_core_version5.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 0 -#define VERSION_REVISION 133 +#define VERSION_REVISION 134 #endif diff --git a/trunk/src/kernel/srs_kernel_ps.cpp b/trunk/src/kernel/srs_kernel_ps.cpp index 87c0963c2..54da78fa5 100644 --- a/trunk/src/kernel/srs_kernel_ps.cpp +++ b/trunk/src/kernel/srs_kernel_ps.cpp @@ -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());