diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-03-26 14:33:52 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2013-03-26 14:33:52 -0400 |
commit | 076cf029c54ac5d328a70d186897fa0678df387a (patch) | |
tree | f7c25fab53a74251e92bd1d53b685adf98f1f45e | |
parent | 5d84ac699038d3d53f6c79c0cf1fee24c2c13be1 (diff) | |
download | farstream-076cf029c54ac5d328a70d186897fa0678df387a.tar.gz |
rtp-codec-discovery: Intersect instead of merge
We want the semantics of intersection, not merging, as this will
produce a caps with two separate structures in some cases.
-rw-r--r-- | gst/fsrtpconference/fs-rtp-discover-codecs.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gst/fsrtpconference/fs-rtp-discover-codecs.c b/gst/fsrtpconference/fs-rtp-discover-codecs.c index 30d66562..5530cc81 100644 --- a/gst/fsrtpconference/fs-rtp-discover-codecs.c +++ b/gst/fsrtpconference/fs-rtp-discover-codecs.c @@ -1108,11 +1108,8 @@ compare_media_caps (gconstpointer a, gconstpointer b) } static gint -compare_rtp_caps (gconstpointer a, gconstpointer b) +compare_rtp_caps (CodecCap *element, GstCaps *c_caps) { - CodecCap *element = (CodecCap *)a; - GstCaps *c_caps = (GstCaps *)b; - return !gst_caps_can_intersect (element->rtp_caps, c_caps); } @@ -1221,8 +1218,9 @@ create_codec_cap_list (GstElementFactory *factory, if (rtp_caps) { if (entry->rtp_caps) { - entry->rtp_caps = gst_caps_merge (gst_caps_copy (rtp_caps), - entry->rtp_caps); + GstCaps *tmp = gst_caps_intersect (rtp_caps, entry->rtp_caps); + gst_caps_unref (entry->rtp_caps); + entry->rtp_caps = tmp; } else { entry->rtp_caps = gst_caps_ref (rtp_caps); /* This shouldn't happen, its we're looking at rtp elements |