[vlc-devel] commit: Detect (and use) unknown codecs - idea by JPeg ( Rafaël Carré )

git version control git at videolan.org
Sun Apr 20 14:04:09 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Apr 20 14:05:15 2008 +0200| [1c55fa94d2fe41dd8f42f12c0eec5de329a7a54b]

Detect (and use) unknown codecs - idea by JPeg

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c55fa94d2fe41dd8f42f12c0eec5de329a7a54b
---

 share/lua/playlist/dailymotion.lua |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/share/lua/playlist/dailymotion.lua b/share/lua/playlist/dailymotion.lua
index 2cbae59..f334cd2 100644
--- a/share/lua/playlist/dailymotion.lua
+++ b/share/lua/playlist/dailymotion.lua
@@ -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]




More information about the vlc-devel mailing list