Skip to content

webrtcsink: fix segment format mismatch with remote offer

webrtcsink was starting the negotiation process on Ready and concurrently moving the consumer pipeline to Playing, but when answering the remote description was set so fast that input streams were connected (and the time format set on appsrc) before the state change to Paused had completed.

This meant gst_base_src_start was happening after that and setting the format back to bytes, the time segment that was next coming in then caused:

basesrc gstbasesrc.c:4255:gst_base_src_push_segment:<video_0> segment format mismatched, ignore

And the consumer pipeline errored out.

The same issue existed in theory when webrtcsink was creating the offer, but was much harder to trigger as it required that the remote answer came in before the state change to Paused had completed.

This commit fixes the issue by simply waiting for the state to have changed to Paused before negotiating.

Merge request reports

Loading