ios - AVAnimator Assertion failure in -[AVMvidFrameDecoder advanceToFrame:] 'framebuffer num bytes' -
i have dolwoaded latest code github avanimator library. added folders avanimator , lzmasdk in addition autopropertyrelease.h , autopropertyrelease.m.
i using following code play video alpha channel (adopted form avanimator app examples):
cgrect iphoneexplosionrect = cgrectmake(0, -2, 640/2, 480/2); cgrect ipadexplosionrect = cgrectmake(0, -5, 840, 630); nsstring *rgbresourcename = @"explosionadjusted_rgb_crf_30_24bpp.m4v"; nsstring *alpharesourcename = @"explosionadjusted_alpha_crf_30_24bpp.m4v"; // output filename nsstring *tmpfilename; nsstring *tmppath; tmpfilename = @"explosion.mvid"; tmppath = [avfileutil gettmpdirpath:tmpfilename]; // set true decode h.264 bool alwaysdecode = false; if (alwaysdecode && [avfileutil fileexists:tmppath]) { bool worked = [[nsfilemanager defaultmanager] removeitematpath:tmppath error:nil]; nsassert(worked, @"could not remove file %@", tmppath); } // loader join 2 h.264 videos single 32bpp .mvid avassetjoinalpharesourceloader *resloader = [avassetjoinalpharesourceloader avassetjoinalpharesourceloader]; resloader.moviergbfilename = rgbresourcename; resloader.moviealphafilename = alpharesourcename; resloader.outpath = tmppath; //resloader.alwaysgenerateadler = true; avanimatormedia *media = [avanimatormedia avanimatormedia]; media.resourceloader = resloader; self.expmedia = media; // frame decoder read generated .mvid file avmvidframedecoder *avmvidframedecoder = [avmvidframedecoder avmvidframedecoder]; media.framedecoder = avmvidframedecoder; // create layer video data directed cgrect expframe; if ([[uidevice currentdevice] userinterfaceidiom] == uiuserinterfaceidiomphone) { expframe = iphoneexplosionrect; } else { expframe = ipadexplosionrect; } calayer *layer = [calayer layer]; layer.frame = expframe; } if (false) { layer.backgroundcolor = [uicolor orangecolor].cgcolor; } [self.view.layer addsublayer:layer]; avanimatorlayer *animatorlayer = [avanimatorlayer avanimatorlayer:layer]; self.expanimatorlayer = animatorlayer; // connect media object layer rendering // sent layer. [animatorlayer attachmedia:media]; //media.animatorrepeatcount = 3; //media.animatorrepeatcount = 30; //media.animatorrepeatcount = int_max; [media preparetoanimate];
once preparetoanimate
hit application fails @ assertion described below
** assertion failure in -[avmvidframedecoder advancetoframe:], /users/user/documents/.../avanimator/avmvidframedecoder.m:844 ...*** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'framebuffer num bytes'
is architecture using (both 32 , 64 bit) causing or else?
i hope can put me on right track
af
i looked assert , different ways might reproduced. tried improperly setting arch flags include 32 bit or 64 bit code in executable , tested on 64 bit device , simulator. not able reproduce problem , not clear how happen. gather more information, added check compiled in either debug or opt mode when framebuffer allocated, pull recent version of avanimator github or grab patch patch here. please make sure none of defines modified in version of code , using recent version of xcode.
Comments
Post a Comment