var OGVDecoderVideoTheoraW = (function() { var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; return ( function(OGVDecoderVideoTheoraW) { OGVDecoderVideoTheoraW = OGVDecoderVideoTheoraW || {}; var a;a||(a=typeof OGVDecoderVideoTheoraW !== 'undefined' ? OGVDecoderVideoTheoraW : {});var m=a;a.memoryLimit&&(a.TOTAL_MEMORY=m.memoryLimit);var n={},p;for(p in a)a.hasOwnProperty(p)&&(n[p]=a[p]);a.arguments=[];a.thisProgram="./this.program";a.quit=function(b,c){throw c;};a.preRun=[];a.postRun=[];var t=!1,u=!1,v=!1,w=!1;t="object"===typeof window;u="function"===typeof importScripts;v="object"===typeof process&&"function"===typeof require&&!t&&!u;w=!t&&!v&&!u;var y=""; if(v){y=__dirname+"/";var z,A;a.read=function(b,c){z||(z=require("fs"));A||(A=require("path"));b=A.normalize(b);b=z.readFileSync(b);return c?b:b.toString()};a.readBinary=function(b){b=a.read(b,!0);b.buffer||(b=new Uint8Array(b));b.buffer||B("Assertion failed: undefined");return b};1L&&E("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+L+"! (TOTAL_STACK=5242880)");a.buffer?buffer=a.buffer:"object"===typeof WebAssembly&&"function"===typeof WebAssembly.Memory?(F=new WebAssembly.Memory({initial:L/65536}),buffer=F.buffer):buffer=new ArrayBuffer(L);da();K[1148]=5247504;function M(b){for(;0>2]=b);return b},i:wa,h:function(b,c,d){J.set(J.subarray(c,c+d),b)},g:function(b){if(2147418112=c?c=I(2*c):c=Math.min(I((3*c+2147483648)/4),2147418112);if(!xa(c))return!1;da();return!0},f:function(b,c,d,e,h,k,l,q,C,g,x,G,R,S,la,ma){function T(b,c,e,d,h,k,q,l){b=za.subarray(b,b+c*e);var f=b.buffer;"function"===typeof f.slice?(b=f.slice(b.byteOffset,b.byteOffset+ b.byteLength),b=new Uint8Array(b)):b=new Uint8Array(b);var g,r;for(g=r=0;g=c||(W&&a._free(W),X=c,W=a._malloc(X));var d=W;a.HEAPU8.set(new Uint8Array(b),d);return a._ogv_video_decoder_process_header(d,c)});c(d)};a.w=[]; a.processFrame=function(b,c){function d(b){a._free(k);c(b)}var e=a._ogv_video_decoder_async(),h=b.byteLength,k=a._malloc(h);e&&a.w.push(d);var l=Z(function(){a.HEAPU8.set(new Uint8Array(b),k);return a._ogv_video_decoder_process_frame(k,h)});e||d(l)};a.close=function(){};a.sync=function(){a._ogv_video_decoder_async()&&(a.w.push(function(){}),Z(function(){a._ogv_video_decoder_process_frame(0,0)}))}; return OGVDecoderVideoTheoraW } ); })(); if (typeof exports === 'object' && typeof module === 'object') module.exports = OGVDecoderVideoTheoraW; else if (typeof define === 'function' && define['amd']) define([], function() { return OGVDecoderVideoTheoraW; }); else if (typeof exports === 'object') exports["OGVDecoderVideoTheoraW"] = OGVDecoderVideoTheoraW;