Always add PPS to the sprop-parameters-set
Rework the parsing code that under certain circumstances dropped the PPS from the sprop-parameters-set. Fixes #572854.
This commit is contained in:
parent
b9adb5846b
commit
aeee52be05
@ -467,23 +467,15 @@ gst_rtp_h264_pay_decode_nal (GstRtpH264Pay * payloader,
|
||||
{
|
||||
guint8 *sps = NULL, *pps = NULL;
|
||||
guint sps_len = 0, pps_len = 0;
|
||||
guint8 header, type;
|
||||
guint len;
|
||||
|
||||
/* default is no update */
|
||||
*updated = FALSE;
|
||||
|
||||
if (size <= 3) {
|
||||
GST_WARNING ("Encoded buffer len %u <= 3", size);
|
||||
} else {
|
||||
GST_DEBUG ("NAL payload len=%u", size);
|
||||
|
||||
/* loop through all NAL units and save the locations of any
|
||||
* SPS / PPS for later processing. Only the last seen SPS
|
||||
* or PPS will be considered */
|
||||
while (size > 5) {
|
||||
guint8 header, type;
|
||||
guint len;
|
||||
|
||||
len = next_start_code (data, size);
|
||||
len = size;
|
||||
header = data[0];
|
||||
type = header & 0x1f;
|
||||
|
||||
@ -508,15 +500,6 @@ gst_rtp_h264_pay_decode_nal (GstRtpH264Pay * payloader,
|
||||
(header >> 5) & 3, type, len);
|
||||
}
|
||||
|
||||
/* end of loop */
|
||||
if (len >= size - 4) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* next NAL start */
|
||||
data += len + 4;
|
||||
size -= len + 4;
|
||||
}
|
||||
|
||||
/* If we encountered an SPS and/or a PPS, check if it's the
|
||||
* same as the one we have. If not, update our version and
|
||||
@ -552,7 +535,6 @@ gst_rtp_h264_pay_decode_nal (GstRtpH264Pay * payloader,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_h264_pay_parse_sps_pps (GstBaseRTPPayload * basepayload,
|
||||
|
Loading…
x
Reference in New Issue
Block a user