vlc/vlc-1.1 | branch: master | Rémi Duraffort <[email protected]> | Sat Nov  
6 15:06:22 2010 +0100| [828dc015471e6ce9ba629c57b0cdfe05a77c1bcb] | committer: 
Rémi Duraffort 

metachannels: force the use of the ffmpeg demuxer for mp4 (extension .m4v here).
(cherry picked from commit 11f64a071b31063915e035d0d3a8d6076ebadf2f)

Signed-off-by: Rémi Duraffort <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=828dc015471e6ce9ba629c57b0cdfe05a77c1bcb
---

 share/lua/playlist/metachannels.lua |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/share/lua/playlist/metachannels.lua 
b/share/lua/playlist/metachannels.lua
index 2e2b7d6..6c1c3a4 100644
--- a/share/lua/playlist/metachannels.lua
+++ b/share/lua/playlist/metachannels.lua
@@ -28,6 +28,8 @@ end
 
 function parse()
     local webpage = ''
+    local options
+
     while true do
         local line = vlc.readline()
         if line == nil then break end
@@ -43,10 +45,12 @@ function parse()
         if( item.name == 'item' ) then
             simplexml.add_name_maps( item )
             local url = string.gsub( item.children_map['link'][1].children[1], 
'&amp;', '&' )
+            if( string.match( url, '%.m4v' ) ) then options = { 
':play-and-pause', ':demux=avformat,ffmpeg' }
+                                               else options = { 
':play-and-pause' } end
             table.insert( tracks, { path = url,
                                     title = 
item.children_map['title'][1].children[1],
                                     arturl = 
item.children_map['media:thumbnail'][1].attributes['url'],
-                                    options = {':play-and-pause'} } )
+                                    options = options } )
         end
     end
 

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to