From: Steinar H. Gunderson Date: Sun, 24 May 2020 17:40:41 +0000 (+0200) Subject: Stop leaking SRT sockets on disconnect. X-Git-Tag: 2.0.0~23 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=5272c491ea6a0c5c0eb353632a6385a88ae74477 Stop leaking SRT sockets on disconnect. --- diff --git a/nageru/ffmpeg_capture.cpp b/nageru/ffmpeg_capture.cpp index cda801a..87d1c00 100644 --- a/nageru/ffmpeg_capture.cpp +++ b/nageru/ffmpeg_capture.cpp @@ -286,6 +286,11 @@ FFmpegCapture::~FFmpegCapture() dequeue_cleanup_callback(); } swr_free(&resampler); +#ifdef HAVE_SRT + if (srt_sock != -1) { + srt_close(srt_sock); + } +#endif } void FFmpegCapture::configure_card()