mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
HEVC: Fix nalu vec duplicate when h265 vps/sps/pps demux. v6.0.26 (#3411)
Co-authored-by: chundonglinlin <chundonglinlin@163.com> Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
parent
b957463e5e
commit
3ce57ae6b6
6 changed files with 17 additions and 5 deletions
|
@ -8,6 +8,7 @@ The changelog for SRS.
|
|||
|
||||
## SRS 6.0 Changelog
|
||||
|
||||
* v6.0, 2023-02-16, Merge [#3411](https://github.com/ossrs/srs/pull/3411): HEVC: Fix nalu vec duplicate when h265 vps/sps/pps demux. v6.0.26 (#3411)
|
||||
* v6.0, 2023-02-14, Merge [#3408](https://github.com/ossrs/srs/pull/3408): GB: Support H.265 for GB28181. v6.0.25 (#3408)
|
||||
* v6.0, 2023-02-12, Merge [#3409](https://github.com/ossrs/srs/pull/3409): SRT: Reduce latency to 200ms of srt2rtc.conf. v6.0.24 (#3409)
|
||||
* v6.0, 2023-02-08, Merge [#3391](https://github.com/ossrs/srs/pull/3391): Config: Error when both HLS and HTTP-TS enabled. v6.0.23 (#3391)
|
||||
|
|
|
@ -28,6 +28,7 @@ The features of SRS.
|
|||
- [x] System: [Experimental] Support H.265 over RTMP and HTTP-FLV, [#465](https://github.com/ossrs/srs/issues/465). v6.0.2+
|
||||
- [x] System: [Experimental] Support H.265 over HTTP-TS and HLS, [#465](https://github.com/ossrs/srs/issues/465). v6.0.11+
|
||||
- [x] System: [Experimental] Support H.265 over MPEG-DASH and DVR to MP4/FLV, [#465](https://github.com/ossrs/srs/issues/465). v6.0.14+
|
||||
- [x] System: [Experimental] Support H.265 over SRT and GB, [#465](https://github.com/ossrs/srs/issues/465). v6.0.25+
|
||||
- [x] API: Support HTTP API([CN](https://ossrs.net/lts/zh-cn/docs/v4/doc/http-api), [EN](https://ossrs.io/lts/en-us/docs/v4/doc/http-api)) for system management. v1.0.0+
|
||||
- [x] API: Support HTTP callback([CN](https://ossrs.net/lts/zh-cn/docs/v4/doc/http-callback), [EN](https://ossrs.io/lts/en-us/docs/v4/doc/http-callback)) for authentication and integration. v2.0.0+
|
||||
- [x] API: Support on_play/stop/publish/unpublish for WebRTC, [#2509](https://github.com/ossrs/srs/issues/2509). v4.0.163+
|
||||
|
@ -72,8 +73,10 @@ The features of SRS.
|
|||
- [x] Other: [Experimental] Support pushing MPEG-TS over UDP, please read [bug #250](https://github.com/ossrs/srs/issues/250). v2.0.111+
|
||||
- [x] Other: [Experimental] Support pushing FLV over HTTP POST, please read wiki([CN](https://ossrs.net/lts/zh-cn/docs/v4/doc/streamer#push-http-flv-to-srs), [EN](https://ossrs.io/lts/en-us/docs/v4/doc/streamer#push-http-flv-to-srs)). v2.0.163+
|
||||
- [x] Other: [Experimental] Support push stream by GB28181, [#3176](https://github.com/ossrs/srs/issues/3176). v5.0.74+
|
||||
- [ ] System: Support H.265 over SRT, TS, HLS and DASH, [#465](https://github.com/ossrs/srs/issues/465).
|
||||
- [ ] System: Proxy to extend origin servers, [#3138](https://github.com/ossrs/srs/issues/3138).
|
||||
- [ ] System: Support source cleanup for idle streams, [#413](https://github.com/ossrs/srs/issues/413).
|
||||
- [ ] System: Support JT808 and JT1708 for transport, [#3420](https://github.com/ossrs/srs/issues/3420).
|
||||
- [ ] System: SRS integrates with kaldi or K2 for live and WebRTC, [#3421](https://github.com/ossrs/srs/issues/3421).
|
||||
- [ ] Live: Support HLS variant, [#463](https://github.com/ossrs/srs/issues/463).
|
||||
- [ ] RTC: Support IETF-QUIC for WebRTC Cluster, [#2091](https://github.com/ossrs/srs/issues/2091).
|
||||
- [ ] RTC: Improve RTC performance to 5K by multiple threading, [#2188](https://github.com/ossrs/srs/issues/2188).
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 6
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 25
|
||||
#define VERSION_REVISION 26
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1048,6 +1048,7 @@ srs_error_t SrsFormat::hevc_demux_hvcc(SrsBuffer* stream)
|
|||
dec_conf_rec_p->temporal_id_nested, dec_conf_rec_p->length_size_minus_one, numOfArrays);
|
||||
|
||||
//parse vps/pps/sps
|
||||
dec_conf_rec_p->nalu_vec.clear();
|
||||
for (int index = 0; index < numOfArrays; index++) {
|
||||
if (!stream->require(3)) {
|
||||
return srs_error_new(ERROR_HEVC_DECODE_ERROR, "requires 3 only %d bytes", stream->left());
|
||||
|
|
|
@ -4737,8 +4737,6 @@ VOID TEST(ConfigEnvTest, CheckEnvValuesDash)
|
|||
|
||||
VOID TEST(ConfigEnvTest, CheckEnvValuesHds)
|
||||
{
|
||||
srs_error_t err;
|
||||
|
||||
if (true) {
|
||||
MockSrsConfig conf;
|
||||
|
||||
|
|
|
@ -4053,10 +4053,19 @@ VOID TEST(KernelCodecTest, HevcVideoFormat)
|
|||
SrsFormat f;
|
||||
HELPER_EXPECT_SUCCESS(f.initialize());
|
||||
|
||||
HELPER_EXPECT_SUCCESS(f.on_video(0, (char *)vps_sps_pps, sizeof(vps_sps_pps)));
|
||||
// firstly demux sequence header
|
||||
HELPER_EXPECT_SUCCESS(f.on_video(0, (char*)vps_sps_pps, sizeof(vps_sps_pps)));
|
||||
EXPECT_EQ(1, f.video->frame_type);
|
||||
EXPECT_EQ(0, f.video->avc_packet_type);
|
||||
EXPECT_EQ(3, f.vcodec->hevc_dec_conf_record_.nalu_vec.size());
|
||||
EXPECT_EQ(1280, f.vcodec->width);
|
||||
EXPECT_EQ(720, f.vcodec->height);
|
||||
|
||||
// secondly demux sequence header
|
||||
HELPER_EXPECT_SUCCESS(f.on_video(0, (char*)vps_sps_pps, sizeof(vps_sps_pps)));
|
||||
EXPECT_EQ(1, f.video->frame_type);
|
||||
EXPECT_EQ(0, f.video->avc_packet_type);
|
||||
EXPECT_EQ(3, f.vcodec->hevc_dec_conf_record_.nalu_vec.size());
|
||||
EXPECT_EQ(1280, f.vcodec->width);
|
||||
EXPECT_EQ(720, f.vcodec->height);
|
||||
|
||||
|
|
Loading…
Reference in a new issue