diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-09-28 14:51:58 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-09-28 14:51:58 +0000 |
commit | 3668cfd91e87b70b41c3bad832d8486f55b9cd77 (patch) | |
tree | 4074335cbff851bf9e746f12a786f1e0ae3c0416 | |
parent | 859501af277062c7a6eab91fe68ed6ce93277815 (diff) | |
download | gst-plugins-bad-3668cfd91e87b70b41c3bad832d8486f55b9cd77.tar.gz gst-plugins-bad-3668cfd91e87b70b41c3bad832d8486f55b9cd77.tar.bz2 gst-plugins-bad-3668cfd91e87b70b41c3bad832d8486f55b9cd77.zip |
gst/rtpmanager/gstrtpbin.c: Fix crasher in dispose.
Original commit message from CVS:
* gst/rtpmanager/gstrtpbin.c: (free_client):
Fix crasher in dispose.
* gst/rtpmanager/rtpjitterbuffer.c: (calculate_skew):
Handle cases where input buffers have no timestamps so that no clock
skew can be calculated, in this case interpollate timestamps based on
rtp timestamp and assume a 0 clock skew.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | gst/rtpmanager/gstrtpbin.c | 3 | ||||
-rw-r--r-- | gst/rtpmanager/rtpjitterbuffer.c | 12 |
3 files changed, 18 insertions, 7 deletions
@@ -1,5 +1,15 @@ 2007-09-28 Wim Taymans <wim.taymans@gmail.com> + * gst/rtpmanager/gstrtpbin.c: (free_client): + Fix crasher in dispose. + + * gst/rtpmanager/rtpjitterbuffer.c: (calculate_skew): + Handle cases where input buffers have no timestamps so that no clock + skew can be calculated, in this case interpollate timestamps based on + rtp timestamp and assume a 0 clock skew. + +2007-09-28 Wim Taymans <wim.taymans@gmail.com> + * gst/rtpmanager/gstrtpjitterbuffer.c: (apply_latency), (gst_rtp_jitter_buffer_loop), (gst_rtp_jitter_buffer_query): Remove jitter correction code, it's now in the lower level object. diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 449d18f2..59ad0155 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -637,9 +637,8 @@ get_client (GstRtpBin * bin, guint8 len, guint8 * data, gboolean * created) } static void -free_client (GstRtpBinClient * client, GstRtpBin * bin) +free_client (GstRtpBinClient * client) { - bin->clients = g_slist_remove (bin->clients, client); g_free (client->cname); g_free (client); } diff --git a/gst/rtpmanager/rtpjitterbuffer.c b/gst/rtpmanager/rtpjitterbuffer.c index 0f52949e..d0304198 100644 --- a/gst/rtpmanager/rtpjitterbuffer.c +++ b/gst/rtpmanager/rtpjitterbuffer.c @@ -199,11 +199,6 @@ calculate_skew (RTPJitterBuffer * jbuf, guint32 rtptime, GstClockTime time) gint pos, i; GstClockTime gstrtptime, out_time; - /* we don't have an arrival timestamp so we can't do skew detection. FIXME, we - * should still apply a timestamp based on RTP timestamp and base_time */ - if (time == -1) - return -1; - ext_rtptime = gst_rtp_buffer_ext_timestamp (&jbuf->ext_rtptime, rtptime); gstrtptime = @@ -217,6 +212,12 @@ calculate_skew (RTPJitterBuffer * jbuf, guint32 rtptime, GstClockTime time) /* elapsed time at sender */ send_diff = gstrtptime - jbuf->base_rtptime; + + /* we don't have an arrival timestamp so we can't do skew detection. we + * should still apply a timestamp based on RTP timestamp and base_time */ + if (time == -1) + goto no_skew; + /* elapsed time at receiver, includes the jitter */ recv_diff = time - jbuf->base_time; @@ -297,6 +298,7 @@ calculate_skew (RTPJitterBuffer * jbuf, guint32 rtptime, GstClockTime time) pos = 0; jbuf->window_pos = pos; +no_skew: /* the output time is defined as the base timestamp plus the RTP time * adjusted for the clock skew .*/ out_time = jbuf->base_time + send_diff + jbuf->skew; |