1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Fix #3749: HLS: Ignore empty NALU to avoid error. v4.0.271

This commit is contained in:
winlin 2023-08-02 10:17:14 +08:00
parent 4e943005ff
commit 6477f31004
3 changed files with 4 additions and 1 deletions

View file

@ -8,6 +8,7 @@ The changelog for SRS.
## SRS 4.0 Changelog
* v4.0, 2023-08-02, Fix [#3749](https://github.com/ossrs/srs/issues/3749): HLS: Ignore empty NALU to avoid error. v4.0.271
* v4.0, 2023-07-21, Merge [#3695](https://github.com/ossrs/srs/pull/3695): API: Fix HTTPS callback issue using SNI in TLS client handshake. v4.0.270 (#3695)
* v4.0, 2022-12-24, For [#296](https://github.com/ossrs/srs/issues/296): MP3: Fix bug for TS or HLS with mp3 codec. v4.0.269
* v4.0, 2022-11-22, Pick [#3079](https://github.com/ossrs/srs/issues/3079): WebRTC: Fix no audio and video issue for Firefox. v4.0.268

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_REVISION 270
#define VERSION_REVISION 271
#endif

View file

@ -544,6 +544,8 @@ srs_error_t SrsVideoFrame::add_sample(char* bytes, int size)
if ((err = SrsFrame::add_sample(bytes, size)) != srs_success) {
return srs_error_wrap(err, "add frame");
}
if (!bytes || size <= 0) return err;
// for video, parse the nalu type, set the IDR flag.
SrsAvcNaluType nal_unit_type = (SrsAvcNaluType)(bytes[0] & 0x1f);