Unverified Commit bd2cb72c authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #8384 from andrewvoznytsa/pr-rtp-jitter-buffer-auto-insert-fix

Fix automatic RTP jitter buffer insertion (TCP/MPEG2 TS did not work …
parents ea9d4403 b30a14ec
...@@ -218,11 +218,12 @@ _linkPadWithOptionalBuffer(GstElement* element, GstPad* pad, gpointer data) ...@@ -218,11 +218,12 @@ _linkPadWithOptionalBuffer(GstElement* element, GstPad* pad, gpointer data)
GstCaps* filter = gst_caps_from_string("application/x-rtp"); GstCaps* filter = gst_caps_from_string("application/x-rtp");
if (filter != nullptr) { if (filter != nullptr) {
GstCaps* caps; GstCaps* caps = gst_pad_query_caps(pad, nullptr);
if ((caps = gst_pad_query_caps(pad, filter)) && !gst_caps_is_empty(caps)) { if (caps != nullptr) {
qDebug() << gst_caps_to_string(caps); if (!gst_caps_is_any(caps) && gst_caps_can_intersect(caps, filter)) {
isRtpPad = TRUE; isRtpPad = TRUE;
}
gst_caps_unref(caps); gst_caps_unref(caps);
caps = nullptr; caps = nullptr;
...@@ -275,10 +276,12 @@ _padProbe(GstElement* element, GstPad* pad, gpointer user_data) ...@@ -275,10 +276,12 @@ _padProbe(GstElement* element, GstPad* pad, gpointer user_data)
GstCaps* filter = gst_caps_from_string("application/x-rtp"); GstCaps* filter = gst_caps_from_string("application/x-rtp");
if (filter != nullptr) { if (filter != nullptr) {
GstCaps* caps; GstCaps* caps = gst_pad_query_caps(pad, nullptr);
if ((caps = gst_pad_query_caps(pad, filter)) && !gst_caps_is_empty(caps)) { if (caps != nullptr) {
*probeRes |= 2; if (!gst_caps_is_any(caps) && gst_caps_can_intersect(caps, filter)) {
*probeRes |= 2;
}
gst_caps_unref(caps); gst_caps_unref(caps);
caps = nullptr; caps = nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment