mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #1641, HLS/RTC picture corrupt for SPS/PPS lost. v4.0.175
This commit is contained in:
parent
71ed6e5dc5
commit
29cf13afa0
5 changed files with 164 additions and 17 deletions
|
@ -818,10 +818,6 @@ srs_error_t SrsFormat::avc_demux_sps_pps(SrsBuffer* stream)
|
|||
if (!stream->require(sequenceParameterSetLength)) {
|
||||
return srs_error_new(ERROR_HLS_DECODE_ERROR, "decode SPS data");
|
||||
}
|
||||
if (vcodec->sequenceParameterSetNALUnit.size() > 0) {
|
||||
stream->skip(sequenceParameterSetLength);
|
||||
continue;
|
||||
}
|
||||
if (sequenceParameterSetLength > 0) {
|
||||
vcodec->sequenceParameterSetNALUnit.resize(sequenceParameterSetLength);
|
||||
stream->read_bytes(&vcodec->sequenceParameterSetNALUnit[0], sequenceParameterSetLength);
|
||||
|
@ -846,10 +842,6 @@ srs_error_t SrsFormat::avc_demux_sps_pps(SrsBuffer* stream)
|
|||
if (!stream->require(pictureParameterSetLength)) {
|
||||
return srs_error_new(ERROR_HLS_DECODE_ERROR, "decode PPS data");
|
||||
}
|
||||
if (vcodec->pictureParameterSetNALUnit.size() > 0) {
|
||||
stream->skip(pictureParameterSetLength);
|
||||
continue;
|
||||
}
|
||||
if (pictureParameterSetLength > 0) {
|
||||
vcodec->pictureParameterSetNALUnit.resize(pictureParameterSetLength);
|
||||
stream->read_bytes(&vcodec->pictureParameterSetNALUnit[0], pictureParameterSetLength);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue