[FFmpeg-cvslog] avformat/hlsenc: Fix check for SPS

Andreas Rheinhardt git at videolan.org
Tue Oct 20 14:31:07 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Tue Oct 20 13:00:04 2020 +0200| [fe2be5d9ce528b3894e1e04dc5f936772508be6b] | committer: Andreas Rheinhardt

avformat/hlsenc: Fix check for SPS

Check all the six bits, not only the two bits that are set for SPS.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fe2be5d9ce528b3894e1e04dc5f936772508be6b
---

 libavformat/hlsenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 4967247bca..cbfd8f7c0d 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -351,7 +351,7 @@ static void write_codec_attr(AVStream *st, VariantStream *vs)
         /* check the boundary of data which from current position is small than extradata_size */
         while (data && (data - st->codecpar->extradata + 19) < st->codecpar->extradata_size) {
             /* get HEVC SPS NAL and seek to profile_tier_level */
-            if (!(data[0] | data[1] | data[2]) && data[3] == 1 && ((data[4] & 0x42) == 0x42)) {
+            if (!(data[0] | data[1] | data[2]) && data[3] == 1 && ((data[4] & 0x7E) == 0x42)) {
                 uint8_t *rbsp_buf;
                 int remain_size = 0;
                 int rbsp_size = 0;



More information about the ffmpeg-cvslog mailing list