Changeset b04fc32cafa3b6879b1eb10c0ca8703ebe57a42e

Show
Ignore:
Timestamp:
03/27/08 21:46:07 (5 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1206650767 +0100
git-parent:

[532b6e4cfe04d691846ffc7d87ce8b7b32103081]

git-author:
Rafaël Carré <funman@videolan.org> 1206650617 +0100
Message:

Fix megavideo lua demuxer

The '\n' was absent from the binary data, and several URLs wouldn't play properly
Simplify the decoding
Remove debug print()
Distribute the file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • share/Makefile.am

    rd2f02db rb04fc32  
    260260    luaplaylist/youtube.lua \ 
    261261    luaplaylist/youtube_homepage.lua \ 
     262    luaplaylist/megavideo.lua \ 
    262263    luaplaylist/metacafe.lua \ 
    263264    luaplaylist/googlevideo.lua \ 
  • share/luaplaylist/megavideo.lua

    rdb088db rb04fc32  
    4848            while line do 
    4949                -- buffer the full xml 
    50                 xml = xml .. line 
     50                xml = xml .. line .. '\n' 
    5151                line = vlc.readline() 
    5252            end 
     
    5757            while s:byte(i) do 
    5858                c = s:byte(i) 
    59                 if c % 4 < 2 then 
    60                     if c < 16 and c > 3 then key = 61 
    61                     elseif c < 96 and c > 67 then key = 189 
    62                     elseif c < 20 and c > 6 then key = 65 
    63                     else vlc.msg_err("Oops, please report URL to developers") 
    64                     end 
    65                 else 
    66                     if c < 16 and c > 3 then key = 65 
    67                     elseif c < 96 and c > 67 then key = 193 
    68                     elseif c < 20 and c > 6 then key = 65 
    69                     else vlc.msg_err("Oops, please report URL to developers") 
    70                     end 
     59                if c % 4 < 2 then mod = 0 else mod = 4 end 
     60                if c < 16 and c > 3 then key = 61 + mod 
     61                elseif c < 96 and c > 67 then key = 189 + mod 
     62                elseif c < 20 and c > 6 then key = 65 
     63                else vlc.msg_err("Oops, please report URL to developers") 
    7164                end 
    7265                i = i + 1 
     
    7669        if path then break end 
    7770    end 
    78     print( path ) 
    7971    if path then 
    8072        return { { path = path } }