After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780105 - rtpsource: "no clock-rate, cannot interpolate rtp" forever
rtpsource: "no clock-rate, cannot interpolate rtp" forever
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.11.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-15 19:06 UTC by Miguel París Díaz
Modified: 2017-03-16 15:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtpsource: get clock-rate from pt if needed to generate SR (2.08 KB, patch)
2017-03-15 19:09 UTC, Miguel París Díaz
committed Details | Review
rtpsource: fix warning message (896 bytes, patch)
2017-03-16 14:02 UTC, Miguel París Díaz
committed Details | Review

Description Miguel París Díaz 2017-03-15 19:06:42 UTC
Hello,
I have found a race condition that makes not to generate correct RTP timestamp for SR RTCP packets.

The race condition provokes the next situation:
 1 - An internal RtpSource-1 is created for SSRC XXXX from rtp_session_on_timeout [1]
 2 - Any RTP packet is sent by the session during few seconds
 3 - Session starts sending RTP packets for SSRC XXXX
 4 - "marking SSRC XXXX as BYE, reason: timed out" (rtp_source_mark_bye [2])
 5 - caps are updated for RtpSource-1 (rtp_source_update_caps [3])
 6 - RtpSource-1 is removed (remove_closing_sources [4])
 7 - A new internal RtpSource-2 is created for SSRC XXXX from rtp_session_send_rtp [5]

After (7), rtp_source_update_caps is never called for RtpSource-2, so clock-rate is never set and every time a new RTCP SR is generated we can see "no clock-rate, cannot interpolate rtp time for SSRC XXXX" [6]

Refs
[1] https://github.com/GStreamer/gst-plugins-good/blob/1.10/gst/rtpmanager/rtpsession.c#L3999
[2] https://github.com/GStreamer/gst-plugins-good/blob/1.10/gst/rtpmanager/rtpsource.c#L1230
[3] https://github.com/GStreamer/gst-plugins-good/blob/1.10/gst/rtpmanager/rtpsource.c#L787
[4] https://github.com/GStreamer/gst-plugins-good/blob/1.10/gst/rtpmanager/rtpsession.c#L3856
[5] https://github.com/GStreamer/gst-plugins-good/blob/1.10/gst/rtpmanager/rtpsession.c#L2988
[6] https://github.com/GStreamer/gst-plugins-good/blob/1.10/gst/rtpmanager/rtpsource.c#L1499
Comment 1 Miguel París Díaz 2017-03-15 19:09:43 UTC
Created attachment 348032 [details] [review]
rtpsource: get clock-rate from pt if needed to generate SR
Comment 2 Sebastian Dröge (slomo) 2017-03-16 13:48:56 UTC
Attachment 348032 [details] pushed as 54a2f33 - rtpsource: get clock-rate from pt if needed to generate SR
Comment 3 Miguel París Díaz 2017-03-16 14:02:07 UTC
Created attachment 348088 [details] [review]
rtpsource: fix warning message

Sorry, I have just realized that the warning message in the previous patch was wrong.
This patch fixes it.
Comment 4 Sebastian Dröge (slomo) 2017-03-16 14:33:11 UTC
Attachment 348088 [details] pushed as 9ffef7e - rtpsource: fix warning message
Comment 5 Miguel París Díaz 2017-03-16 15:22:54 UTC
Thanks Sebastian!! ;)