This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit bbd63b5a82fff38814274b50e53c3f8e2cef82d4 Author: Jack Lau <[email protected]> AuthorDate: Mon Oct 27 20:06:23 2025 +0800 Commit: Jack Lau <[email protected]> CommitDate: Wed Jan 21 08:52:28 2026 +0000 avformat/whip: handle the error of dtls_initialize Correct the log level to AV_LOG_ERROR when dtls fails Signed-off-by: Jack Lau <[email protected]> --- libavformat/whip.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 76d38a7e73..27ed0f5f11 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -405,8 +405,10 @@ static av_cold int dtls_initialize(AVFormatContext *s) ret = ffurl_open_whitelist(&whip->dtls_uc, buf, AVIO_FLAG_READ_WRITE, &s->interrupt_callback, &opts, s->protocol_whitelist, s->protocol_blacklist, NULL); av_dict_free(&opts); - if (ret < 0) + if (ret < 0) { + av_log(whip, AV_LOG_ERROR, "Failed to open DTLS url:%s\n", buf); goto end; + } /* reuse the udp created by whip */ ff_tls_set_external_socket(whip->dtls_uc, whip->udp); @@ -1321,8 +1323,6 @@ next_packet: if (whip->state < WHIP_STATE_ICE_CONNECTED) { if (whip->is_peer_ice_lite) whip->state = WHIP_STATE_ICE_CONNECTED; - - dtls_initialize(s); } goto next_packet; } @@ -1343,10 +1343,14 @@ next_packet: av_log(whip, AV_LOG_VERBOSE, "ICE STUN ok, state=%d, url=udp://%s:%d, location=%s, username=%s:%s, res=%dB, elapsed=%.2fms\n", whip->state, whip->ice_host, whip->ice_port, whip->whip_resource_url ? whip->whip_resource_url : "", whip->ice_ufrag_remote, whip->ice_ufrag_local, ret, ELAPSED(whip->whip_starttime, whip->whip_ice_time)); + + ret = dtls_initialize(s); + if (ret < 0) + goto end; ret = ffurl_handshake(whip->dtls_uc); if (ret < 0) { whip->state = WHIP_STATE_FAILED; - av_log(whip, AV_LOG_VERBOSE, "DTLS session failed\n"); + av_log(whip, AV_LOG_ERROR, "DTLS session failed\n"); goto end; } if (!ret) { _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
