diff options
author | Thijs Vermeir <thijsvermeir@gmail.com> | 2008-01-29 18:57:27 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-01-29 18:57:27 +0000 |
commit | 7460bb6d910201c1b97db893e1d5a0186366717e (patch) | |
tree | 2dfad7be8917e9f0ac1300dd07d144ff64f89f94 /gst/rtpmanager | |
parent | de592925a7ed5f413bb4a1d504f08bb9cdce0c45 (diff) | |
download | gst-plugins-bad-7460bb6d910201c1b97db893e1d5a0186366717e.tar.gz gst-plugins-bad-7460bb6d910201c1b97db893e1d5a0186366717e.tar.bz2 gst-plugins-bad-7460bb6d910201c1b97db893e1d5a0186366717e.zip |
gst/rtpmanager/gstrtpjitterbuffer.c: Try to get the new clock-rate from the buffer caps when we receive a new payload...
Original commit message from CVS:
Patch by: Thijs Vermeir <thijsvermeir at gmail dot com>
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_chain):
Try to get the new clock-rate from the buffer caps when we receive a new
payload type instead of always firing the signal. Fixes #512774.
Diffstat (limited to 'gst/rtpmanager')
-rw-r--r-- | gst/rtpmanager/gstrtpjitterbuffer.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 142cc95f..3d2e7797 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -806,9 +806,16 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstBuffer * buffer) priv = jitterbuffer->priv; if (priv->last_pt != gst_rtp_buffer_get_payload_type (buffer)) { + GstCaps *caps; + priv->last_pt = gst_rtp_buffer_get_payload_type (buffer); /* reset clock-rate so that we get a new one */ priv->clock_rate = -1; + /* Try to get the clock-rate from the caps first if we can. If there are no + * caps we must fire the signal to get the clock-rate. */ + if ((caps = GST_BUFFER_CAPS (buffer))) { + gst_jitter_buffer_sink_parse_caps (jitterbuffer, caps); + } } if (priv->clock_rate == -1) { |