Browse Source

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@gmail.com>
tags/n4.4
Andreas Rheinhardt 5 years ago
parent
commit
fe2be5d9ce
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/hlsenc.c

+ 1
- 1
libavformat/hlsenc.c View File

@@ -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;


Loading…
Cancel
Save