diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-01-11 17:02:30 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-01-11 17:02:30 +0000 |
commit | 59d2dce4fd9bfc782bdc51a0a65fb25a577fbe0b (patch) | |
tree | 41b0dedca581a749466bb73c0c7763a9f38b628e /gst | |
parent | 2e0d1efb0ea5863bfccbf40bf96fc6ef15ad8ae9 (diff) | |
download | gst-plugins-bad-59d2dce4fd9bfc782bdc51a0a65fb25a577fbe0b.tar.gz gst-plugins-bad-59d2dce4fd9bfc782bdc51a0a65fb25a577fbe0b.tar.bz2 gst-plugins-bad-59d2dce4fd9bfc782bdc51a0a65fb25a577fbe0b.zip |
gst/rtpmanager/gstrtpsession.c: If we find the caps in the cache, use it to parse the clock-rate instead of returning...
Original commit message from CVS:
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_clock_rate):
If we find the caps in the cache, use it to parse the clock-rate instead
of returning an error. Fixes a TODO as found by Youness Alaoui.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtpmanager/gstrtpsession.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index ffdaf901..462dc6fb 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -1188,11 +1188,10 @@ gst_rtp_session_clock_rate (RTPSession * sess, guint8 payload, GST_RTP_SESSION_LOCK (rtpsession); ipayload = payload; /* make compiler happy */ caps = g_hash_table_lookup (priv->ptmap, GINT_TO_POINTER (ipayload)); - /* TODO : check if we should really goto done. This will return -1 - * instead of the clock rate of the caps we just found! */ if (caps) - goto done; + goto found; + /* not found in the cache, try to get it with a signal */ g_value_init (&args[0], GST_TYPE_ELEMENT); g_value_set_object (&args[0], rtpsession); g_value_init (&args[1], G_TYPE_UINT); @@ -1210,7 +1209,7 @@ gst_rtp_session_clock_rate (RTPSession * sess, guint8 payload, gst_rtp_session_cache_caps (rtpsession, caps); - /* TODO : This is where we should 'goto' */ +found: s = gst_caps_get_structure (caps, 0); if (!gst_structure_get_int (s, "clock-rate", &result)) goto no_clock_rate; |