fix videoplay md5 err for fireball/issues/6755 (#2657)

* label texture releaseTexture changed _releaseTexture

* fix videoplay md5 err for fireball/issues/6755

* refine code
This commit is contained in:
Knox
2018-05-10 10:28:22 +08:00
committed by pandamicro
parent 6b9c9242fa
commit 174635b630
2 changed files with 9 additions and 7 deletions
+8 -6
View File
@@ -298,15 +298,17 @@ var VideoPlayer = cc.Class({
_updateVideoSource: function () {
var sgNode = this._sgNode;
let url = '';
if (this.resourceType === ResourceType.REMOTE) {
if (cc.loader.md5Pipe) {
this.remoteURL = cc.loader.md5Pipe.transformURL(this.remoteURL);
}
sgNode.setURL(this.remoteURL);
url = this.remoteURL;
}
else {
sgNode.setURL(this._clip.nativeUrl || '');
else if (this._clip) {
url = this._clip.nativeUrl || '';
}
if (url && cc.loader.md5Pipe) {
url = cc.loader.md5Pipe.transformURL(url);
}
sgNode.setURL(url);
},
_initSgNode: function () {
+1 -1
View File
@@ -1271,7 +1271,7 @@ _ccsg.Label.pool = new JS.Pool(function (label) {
label._fontHandle = "";
label._labelType = 0;
label._resetBMFont();
label._renderCmd._texture.releaseTexture();
label._renderCmd._texture._releaseTexture();
if (CC_DEV) {
cc.assert(!label._parent, 'Recycling label\'s parent should be null!');
}