obs-ffmpeg: Initialize SRT stats object before requesting stats

The `srt_bstats()` function is not guaranteed to zero the stats object
before filling in stats. If a socket was connected, then disconnected,
without any data being sent over it, the stats object would remain
uninitialized, and weird results could occur.
This commit is contained in:
tt2468 2023-02-08 11:13:41 -08:00
parent f81f580d26
commit b2375a0660

View file

@ -854,7 +854,7 @@ static int libsrt_close(URLContext *h)
if (s->passphrase)
av_freep(&s->passphrase);
/* Log stream stats. */
SRT_TRACEBSTATS perf;
SRT_TRACEBSTATS perf = {0};
srt_bstats(s->fd, &perf, 1);
blog(LOG_INFO, "---------------------------------");
blog(LOG_INFO,