mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
rtph264pay: scale spspps_interval to milliseconds
The spspps_interval is kept in seconds. Convert it to milliseconds before comparing it to another value in milliseconds.
This commit is contained in:
parent
8ca984d5e8
commit
1f6b06ce66
1 changed files with 3 additions and 2 deletions
|
@ -655,7 +655,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload, guint8 * data,
|
||||||
GST_DEBUG_OBJECT (rtph264pay, "interval since last SPS/PPS %ums", diff);
|
GST_DEBUG_OBJECT (rtph264pay, "interval since last SPS/PPS %ums", diff);
|
||||||
|
|
||||||
/* bigger than interval, queue SPS/PPS */
|
/* bigger than interval, queue SPS/PPS */
|
||||||
if (diff >= rtph264pay->spspps_interval) {
|
if (diff >= (rtph264pay->spspps_interval * GST_MSECOND)) {
|
||||||
GST_DEBUG_OBJECT (rtph264pay, "time to send SPS/PPS");
|
GST_DEBUG_OBJECT (rtph264pay, "time to send SPS/PPS");
|
||||||
send_spspps = TRUE;
|
send_spspps = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -667,7 +667,8 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload, guint8 * data,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (send_spspps) {
|
if (send_spspps) {
|
||||||
/* we need to send SPS/PPS now first */
|
/* we need to send SPS/PPS now first. FIXME, don't use the timestamp for
|
||||||
|
* checking when we need to send SPS/PPS but convert to running_time first. */
|
||||||
ret = gst_rtp_h264_pay_send_sps_pps (basepayload, rtph264pay, timestamp);
|
ret = gst_rtp_h264_pay_send_sps_pps (basepayload, rtph264pay, timestamp);
|
||||||
if (ret != GST_FLOW_OK)
|
if (ret != GST_FLOW_OK)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue