Skip to content

Commit b7d0383

Browse files
JackLau1222claude
authored andcommitted
workflows/test: add DTLS active role to SRS and Pion matrix
The CI previously only exercised the FFmpeg WHIP DTLS-passive path (default). The DTLS-active path goes through tls_open()'s external_sock branch, which has been the source of recent crashes (e.g. NULL s->host in tls_gnutls.c) and key-derivation bugs that passive-only tests miss. Add a dtls_role={passive,active} matrix dimension to the SRS and Pion jobs, expanding each from 3 to 6 runs across {openssl,gnutls,mbedtls}. When dtls_role=active, the streaming step passes -whip_flags +dtls_active to ffmpeg. Janus is left passive-only for now: its simple-whip-server frontend has independent SDP-handling quirks that would muddy the signal. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent ca4bdee commit b7d0383

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,13 @@ jobs:
123123
runs-on: ubuntu-22.04
124124

125125
srs:
126-
name: "SRS with FFmpeg (${{ matrix.tls }})"
126+
name: "SRS with FFmpeg (${{ matrix.tls }}, dtls=${{ matrix.dtls_role }})"
127127
needs: build
128128
strategy:
129129
fail-fast: false
130130
matrix:
131131
tls: [openssl, gnutls, mbedtls]
132+
dtls_role: [passive, active]
132133
steps:
133134
- name: Checkout repository
134135
uses: actions/checkout@v4
@@ -160,9 +161,14 @@ jobs:
160161
- name: Streaming with FFmpeg
161162
run: |
162163
set -euxo pipefail
164+
if [[ "${{ matrix.dtls_role }}" == "active" ]]; then
165+
WHIP_FLAGS="-whip_flags +dtls_active"
166+
else
167+
WHIP_FLAGS=""
168+
fi
163169
nohup ./ffmpeg -t 30 -re -f lavfi -i testsrc=size=1280x720 -f lavfi -i sine=frequency=440 -pix_fmt yuv420p \
164170
-vcodec libx264 -profile:v baseline -r 25 -g 50 -acodec libopus -ar 48000 -ac 2 \
165-
-f whip "http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream" \
171+
-f whip $WHIP_FLAGS "http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream" \
166172
1>ffstdout.log 2>ffstderr.log &
167173
- name: Check SRS Streaming
168174
id: streaming
@@ -203,12 +209,13 @@ jobs:
203209
runs-on: ubuntu-22.04
204210

205211
pion:
206-
name: "Pion with FFmpeg (${{ matrix.tls }})"
212+
name: "Pion with FFmpeg (${{ matrix.tls }}, dtls=${{ matrix.dtls_role }})"
207213
needs: build
208214
strategy:
209215
fail-fast: false
210216
matrix:
211217
tls: [openssl, gnutls, mbedtls]
218+
dtls_role: [passive, active]
212219
steps:
213220
- name: Checkout repository
214221
uses: actions/checkout@v4
@@ -254,9 +261,14 @@ jobs:
254261
done
255262
256263
cd $GITHUB_WORKSPACE
264+
if [[ "${{ matrix.dtls_role }}" == "active" ]]; then
265+
WHIP_FLAGS="-whip_flags +dtls_active"
266+
else
267+
WHIP_FLAGS=""
268+
fi
257269
nohup ./ffmpeg -t 30 -re -f lavfi -i testsrc=size=1280x720 -f lavfi -i sine=frequency=440 -pix_fmt yuv420p \
258270
-vcodec libx264 -profile:v baseline -r 25 -g 50 -acodec libopus -ar 48000 -ac 2 \
259-
-f whip -authorization "seanTest" "http://localhost:8080/whip" \
271+
-f whip $WHIP_FLAGS -authorization "seanTest" "http://localhost:8080/whip" \
260272
1>ffstdout.log 2>ffstderr.log &
261273
sleep 10
262274
pkill -SIGINT ffmpeg && sleep 3 ||

0 commit comments

Comments
 (0)