Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-bad gst-plugins-bad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 986
    • Issues 986
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 132
    • Merge requests 132
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gst-plugins-badgst-plugins-bad
  • Issues
  • #1377

Closed
Open
Created Aug 06, 2020 by Connor MacDonald@connor

webrtcbin: assertion failure when data channel is created before linking

I am observing a failed assertion when I attempt to create a data channel before linking the webrtcbin to a source:

ERROR:../subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c:2291:sdp_media_from_transceiver: assertion failed: (trans->mline == -1 || trans->mline == media_idx)

I am encountering this issue in a situation where I am dynamically adding instances of webrtcbin to a pipeline. I believe this should be possible like it is in the JavaScript API, e.g.:

var pc = new RTCPeerConnection();
var channel = pc.createDataChannel('channel');
pc.addTrack(track);

Even if this is a known limitation, this error should be detected and reported.

I have uploaded test code that is simply a version of the basic webrtc example that is modified to reproduce the bug. If you change these lines:

g_signal_emit_by_name (webrtc1, "create-data-channel", "channel", NULL, &channel);
gst_element_link (rtp_caps_filter, webrtc1);

to these:

gst_element_link (rtp_caps_filter, webrtc1);
g_signal_emit_by_name (webrtc1, "create-data-channel", "channel", NULL, &channel);

then everything works as expected.

Here is the output with GST_DEBUG=4: debug_log_0.txt

For now, the work-around is to (obviously) defer data channel creation until after the element has been linked.

I am using version GStreamer 1.17.0.1.

Assignee
Assign to
Time tracking