[downloader/external] Support MP3 hls in FFmpegFD

FFmpegFD forces mpegts or mp4 for m3u8 streams, but if the stream is MP3
we should keep use that format.
This commit is contained in:
Rabin Vincent 2017-01-04 21:20:15 +01:00
parent 24d8a75982
commit a6745124f9

View File

@ -260,7 +260,7 @@ class FFmpegFD(ExternalFD):
args += ['-rtmp_live', 'live'] args += ['-rtmp_live', 'live']
args += ['-i', url, '-c', 'copy'] args += ['-i', url, '-c', 'copy']
if protocol in ('m3u8', 'm3u8_native'): if protocol in ('m3u8', 'm3u8_native') and info_dict.get('ext') != 'mp3':
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-': if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
args += ['-f', 'mpegts'] args += ['-f', 'mpegts']
else: else: