]> git.sesse.net Git - vlc/commitdiff
Detect (and use) unknown codecs - idea by JPeg
authorRafaël Carré <funman@videolan.org>
Sun, 20 Apr 2008 12:05:15 +0000 (14:05 +0200)
committerRafaël Carré <funman@videolan.org>
Sun, 20 Apr 2008 12:05:15 +0000 (14:05 +0200)
share/lua/playlist/dailymotion.lua

index 2cbae59842b3b20dc67136cf30923177871feb62..f334cd21dbedfef8fbaefa1165b074046012514c 100644 (file)
@@ -61,6 +61,10 @@ function parse()
             local score = 666
             local bestcodec
             for codec,_ in pairs(available) do
+                if pref[codec] == nil then
+                    vlc.msg_warn( "Unknown codec: " .. codec )
+                    pref[codec] = 42 -- try the 1st unknown codec if other fail
+                end
                 if pref[codec] < score then
                     bestcodec = codec
                     score = pref[codec]