MT#55283 Fix not sending metadata on TLS forwarded

... stream after a reconnect

if we're in the middle of a disconnect then ssrc_tls_state may have destroyed
the streambuf so we need to skip the rest of the function, otherwise the now
null pointer is passed into streambuf_write, which will return immediately and
the metadata will have been marked as sent when it hasn't been

closes #1694

Change-Id: I679fdd0ff9245e4413bc5a5ab40a70ea4f9ef7c0
(cherry picked from commit 88c0ffd49b)
(cherry picked from commit a06c0156ae)
pull/1736/head
Tom Briden 2 years ago committed by Richard Fuchs
parent e738a47a93
commit d3703c0853

@ -146,9 +146,15 @@ no_recording:
if (ssrc->tls_fwd_stream) {
// XXX might be a second resampling to same format
dbg("SSRC %lx of stream #%lu has TLS forwarding stream", ssrc->ssrc, stream->id);
AVFrame *dec_frame = resample_frame(&ssrc->tls_fwd_resampler, frame, &ssrc->tls_fwd_format);
ssrc_tls_state(ssrc);
// if we're in the middle of a disconnect then ssrc_tls_state may have destroyed the streambuf
// so we need to skip the below to ensure we only send metadata for the new connection
// once we've got a new streambuf
if (!ssrc->tls_fwd_stream)
goto err;
AVFrame *dec_frame = resample_frame(&ssrc->tls_fwd_resampler, frame, &ssrc->tls_fwd_format);
if (!ssrc->sent_intro) {
tag_t *tag = NULL;

Loading…
Cancel
Save