소스 검색

[downloader/hls] Add headers only for http(s) URLs

ffmpeg 2.8.1 raises an error with -headers and non-http input files.
Yen Chi Hsuan 10 년 전
부모
커밋
985e4fdc07
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      youtube_dl/downloader/hls.py

+ 1 - 1
youtube_dl/downloader/hls.py

@@ -30,7 +30,7 @@ class HlsFD(FileDownloader):
 
         args = [ffpp.executable, '-y']
 
-        if info_dict['http_headers']:
+        if info_dict['http_headers'] and re.match(r'^https?://', url):
             # Trailing \r\n after each HTTP header is important to prevent warning from ffmpeg/avconv:
             # [http @ 00000000003d2fa0] No trailing CRLF found in HTTP header.
             args += [