mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 09:39:15 +00:00
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:
parent
f81f580d26
commit
b2375a0660
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue