Changeset b04fc32cafa3b6879b1eb10c0ca8703ebe57a42e
- 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
| rd2f02db |
rb04fc32 |
|
| 260 | 260 | luaplaylist/youtube.lua \ |
|---|
| 261 | 261 | luaplaylist/youtube_homepage.lua \ |
|---|
| | 262 | luaplaylist/megavideo.lua \ |
|---|
| 262 | 263 | luaplaylist/metacafe.lua \ |
|---|
| 263 | 264 | luaplaylist/googlevideo.lua \ |
|---|
| rdb088db |
rb04fc32 |
|
| 48 | 48 | while line do |
|---|
| 49 | 49 | -- buffer the full xml |
|---|
| 50 | | xml = xml .. line |
|---|
| | 50 | xml = xml .. line .. '\n' |
|---|
| 51 | 51 | line = vlc.readline() |
|---|
| 52 | 52 | end |
|---|
| … | … | |
| 57 | 57 | while s:byte(i) do |
|---|
| 58 | 58 | 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") |
|---|
| 71 | 64 | end |
|---|
| 72 | 65 | i = i + 1 |
|---|
| … | … | |
| 76 | 69 | if path then break end |
|---|
| 77 | 70 | end |
|---|
| 78 | | print( path ) |
|---|
| 79 | 71 | if path then |
|---|
| 80 | 72 | return { { path = path } } |
|---|