Explorar o código

[downloader/hls] Properly close stream

Sergey M․ %!s(int64=10) %!d(string=hai) anos
pai
achega
133a2b4ac2
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      youtube_dl/downloader/hls.py

+ 1 - 0
youtube_dl/downloader/hls.py

@@ -92,6 +92,7 @@ class NativeHlsFD(FragmentFD):
                 return False
             down, frag_sanitized = sanitize_open(frag_filename, 'rb')
             ctx['dest_stream'].write(down.read())
+            down.close()
             frags_filenames.append(frag_sanitized)
 
         self._finish_frag_download(ctx)