openwebrtc: ERROR:owr_transport_agent.c:917:remove_existing_send_source_and_payload: assertion failed: (sinkpad)

On iOS Native,

cerbero version 2015/12/4
openssl: Bump to 1.0.2e
git:4e8ec2994bb3298db37c3f84356260e86ea3e07a

when the streaming didnt connected and call below api from reset() will crash every time.

owr_media_session_set_send_source(media_session, NULL);

but when it’s connected to other whatever audio or video are all fine.

crash log call stack below: https://gist.github.com/xelven/e7387e494b79a0b8090b

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

I solved the issue by overwriting some methods from the OpenWebrtc framework inside the iOS project. Better would be to provide these methods using it in iOS as well.

Following stuff solves the issue in my app:

` OwrMediaType media_type; guint stream_id;

if (transport_agent) {
    media_sessions = g_object_steal_data(G_OBJECT(transport_agent), "media-sessions");
    for (item = media_sessions; item; item = item->next) {
        media_session = OWR_MEDIA_SESSION(item->data);

        OwrMediaSource *media_source = _owr_media_session_get_send_source_OVERWRITTEN(media_session);

        stream_id = get_stream_id(transport_agent, OWR_SESSION(media_session));

        g_object_get(media_source, "media-type", &media_type, NULL);
        g_warn_if_fail(media_type != OWR_MEDIA_TYPE_UNKNOWN);

        gchar *pad_name;
        if (media_type == OWR_MEDIA_TYPE_VIDEO) {
            pad_name = g_strdup_printf("video_sink_%u_%u", OWR_CODEC_TYPE_NONE, stream_id);
        }
        else {
            pad_name = g_strdup_printf("audio_raw_sink_%u", stream_id);
        }

        GstPad *sinkpad = gst_element_get_static_pad(transport_agent->priv->transport_bin, pad_name);
        g_free(pad_name);

        //FIXED Error: ERROR:owr_transport_agent.c:917:remove_existing_send_source_and_payload: assertion failed: (sinkpad)
        //@see https://github.com/EricssonResearch/openwebrtc/issues/574
        g_warn_if_fail(sinkpad != NULL);
        if(sinkpad != NULL){
            owr_media_session_set_send_source(media_session, NULL);
        }
    }
    g_list_free(media_sessions);
    g_object_unref(transport_agent);
    transport_agent = NULL;
}`