X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fpostprocessor%2Fffmpeg.py;h=380bc6f292f2390fdf5dabd131a20184ba8334df;hb=2b2dfae83ef80f86e9983ded3c4514b58b1eed60;hp=22d7ac65ac6fe6e0aedc4c91a101fb8272b9dd97;hpb=86e284e028cef6616260e2da5d5a260b1ef76fa7;p=youtube-dl diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py index 22d7ac65a..380bc6f29 100644 --- a/youtube_dl/postprocessor/ffmpeg.py +++ b/youtube_dl/postprocessor/ffmpeg.py @@ -508,8 +508,8 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor): with io.open(srt_file, 'wt', encoding='utf-8') as f: f.write(srt_data) + old_file = srt_file - ext = 'srt' subs[lang] = { 'ext': 'srt', 'data': srt_data @@ -517,12 +517,14 @@ class FFmpegSubtitlesConvertorPP(FFmpegPostProcessor): if new_ext == 'srt': continue + else: + sub_filenames.append(srt_file) self.run_ffmpeg(old_file, new_file, ['-f', new_format]) with io.open(new_file, 'rt', encoding='utf-8') as f: subs[lang] = { - 'ext': ext, + 'ext': new_ext, 'data': f.read(), }