Merge default into minor

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-08-29 22:41:24 -03:00
23 changed files with 232 additions and 68 deletions
@@ -352,13 +352,17 @@ function love.graphics.newVideo(file, loadaudio)
local video = love.graphics._newVideo(file)
local source, success
if loadaudio ~= false then
if loadaudio ~= false and love.audio then
success, source = pcall(love.audio.newSource, video:getStream():getFilename(), "stream")
end
if success then
video:setSource(source)
elseif loadaudio == true then
error("Video had no audio track", 2)
if love.audio then
error("Video had no audio track", 2)
else
error("love.audio was not loaded", 2)
end
else
video:getStream():setSync()
end