[vlc-commits] youtube.lua: partial fix for format matching

Pierre Ynard git at videolan.org
Mon Jan 9 02:25:42 CET 2012


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Jan  9 02:25:51 2012 +0100| [0d4e2968970e2a344ce81c979b78e27435c485c6] | committer: Pierre Ynard

youtube.lua: partial fix for format matching

Stereoscopic formats would get mistakenly selected

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

 share/lua/playlist/youtube.lua |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 38bc320..fd4db30 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -119,7 +119,7 @@ function parse()
                 if url_map then
                     -- FIXME: do this properly
                     url_map = string.gsub( url_map, "\\u0026", "&" )
-                    for url,itag in string.gmatch( url_map, "url=([^&,]+).-&itag=(%d+)" ) do
+                    for url,itag in string.gmatch( url_map, "url=([^&,]+)[^,]*&itag=(%d+)" ) do
                         -- Apparently formats are listed in quality order,
                         -- so we can afford to simply take the first one
                         if not fmt or tonumber( itag ) == tonumber( fmt ) then



More information about the vlc-commits mailing list