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 2cbae59..f334cd2 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]