[ffmpeg] fix condition(fixes #8440)
authorremitamine <remitamine@gmail.com>
Fri, 5 Feb 2016 14:12:06 +0000 (15:12 +0100)
committerremitamine <remitamine@gmail.com>
Fri, 5 Feb 2016 14:12:06 +0000 (15:12 +0100)
youtube_dl/postprocessor/ffmpeg.py

index e293e03e681b431a13ac3681e0e7b256c2e3be98..7e85a702d22180c015c768f563f41d498419d629 100644 (file)
@@ -392,7 +392,7 @@ class FFmpegMetadataPP(FFmpegPostProcessor):
             options.extend(['-metadata', '%s=%s' % (name, value)])
 
         # https://github.com/rg3/youtube-dl/issues/8350
-        if info['protocol'] == 'm3u8_native' or self._downloader.params.get('hls_prefer_native', False):
+        if info.get('protocol') == 'm3u8_native' or self._downloader.params.get('hls_prefer_native', False):
             options.extend(['-bsf:a', 'aac_adtstoasc'])
 
         self._downloader.to_screen('[ffmpeg] Adding metadata to \'%s\'' % filename)