mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
rtppassthroughpay: fix critical in gst-inspect
gst_segment_to_running_time() will fail noisily if the segment has not been initialised yet. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6151>
This commit is contained in:
parent
ce45e63dcc
commit
0a6948ee20
2 changed files with 7 additions and 3 deletions
|
@ -15978,7 +15978,7 @@
|
||||||
"construct": false,
|
"construct": false,
|
||||||
"construct-only": false,
|
"construct-only": false,
|
||||||
"controllable": false,
|
"controllable": false,
|
||||||
"default": "application/x-rtp-payload-stats, clock-rate=(uint)0, running-time=(guint64)18446744073709551615, seqnum=(uint)0, timestamp=(uint)0, ssrc=(uint)0, pt=(uint)128, seqnum-offset=(uint)0, timestamp-offset=(uint)0;",
|
"default": "application/x-rtp-payload-stats, clock-rate=(uint)0, running-time=(guint64)0, seqnum=(uint)0, timestamp=(uint)0, ssrc=(uint)0, pt=(uint)128, seqnum-offset=(uint)0, timestamp-offset=(uint)0;",
|
||||||
"mutable": "null",
|
"mutable": "null",
|
||||||
"readable": true,
|
"readable": true,
|
||||||
"type": "GstStructure",
|
"type": "GstStructure",
|
||||||
|
|
|
@ -452,8 +452,12 @@ gst_rtp_passthrough_pay_create_stats (GstRtpPassthroughPay * self)
|
||||||
{
|
{
|
||||||
GstClockTime running_time;
|
GstClockTime running_time;
|
||||||
|
|
||||||
running_time = gst_segment_to_running_time (&self->segment, GST_FORMAT_TIME,
|
if (self->segment.format == GST_FORMAT_UNDEFINED) {
|
||||||
self->pts_or_dts);
|
running_time = 0;
|
||||||
|
} else {
|
||||||
|
running_time = gst_segment_to_running_time (&self->segment, GST_FORMAT_TIME,
|
||||||
|
self->pts_or_dts);
|
||||||
|
}
|
||||||
|
|
||||||
return gst_structure_new ("application/x-rtp-payload-stats", "clock-rate",
|
return gst_structure_new ("application/x-rtp-payload-stats", "clock-rate",
|
||||||
G_TYPE_UINT, (guint) self->clock_rate, "running-time", G_TYPE_UINT64,
|
G_TYPE_UINT, (guint) self->clock_rate, "running-time", G_TYPE_UINT64,
|
||||||
|
|
Loading…
Reference in a new issue