Author: adrian Date: Wed Mar 16 13:53:20 2011 New Revision: 9370 URL: http://svn.slimdevices.com/jive?rev=9370&view=rev Log: Bug: N/A Description: load rtmp.so within pcall so if it fails we can continue to play other streams
Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Rtmp.lua Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Rtmp.lua URL: http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Rtmp.lua?rev=9370&r1=9369&r2=9370&view=diff ============================================================================== --- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Rtmp.lua (original) +++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/audio/Rtmp.lua Wed Mar 16 13:53:20 2011 @@ -26,7 +26,7 @@ local Stream = require("squeezeplay.stream") local mime = require("mime") -local rtmpC = require("rtmp") +local hasC, rtmpC = pcall(require, "rtmp") local debug = require("jive.utils.debug") local log = require("jive.utils.log").logger("audio.decode") @@ -36,7 +36,9 @@ local FLASH_VER = "LNX 10,0,22,87" -- C read method -read = rtmpC.read +if hasC then + read = rtmpC.read +end -- session params (can't be stored in the object as we reuse the streambuf object) rtmpMessages = {} -- not local so it can be accessed from C @@ -47,6 +49,11 @@ -- initialise rtmpMessages = {} slimproto = playback.slimproto + + if not hasC then + log:warn("no rtmp binary module loaded - stream not supported") + return + end -- extract the pre built rtmp packets or params within the header for k, v in string.gmatch(header, "(%w+)=([a-zA-Z0-9%/%+]+%=*)&") do _______________________________________________ Jive-checkins mailing list Jive-checkins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/jive-checkins