[utils] mimetype2ext: return 'm4a' for 'audio/mp4' (fixes #8620)
[youtube-dl] / youtube_dl / utils.py
index 7ce661b09ea428ea05954b355e09ea298e04fb73..a2c6780ca354f98514910752cec596a4eee172e5 100644 (file)
@@ -1836,6 +1836,12 @@ def error_to_compat_str(err):
 
 
 def mimetype2ext(mt):
+    ext = {
+        'audio/mp4': 'm4a',
+    }.get(mt)
+    if ext is not None:
+        return ext
+
     _, _, res = mt.rpartition('/')
 
     return {