"vpx_ports/arm_cpudetect.c" #elif defined __APPLE__ int arm_cpu_caps(void) {return HAS_EDSP|HAS_MEDIA|HAS_NEON;} "vpx_ports/x86.h" FROM: #if defined(_MSC_VER) && _MSC_VER >= 1700 #undef NOMINMAX #define NOMINMAX #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include #if WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_APP) #define getenv(x) NULL #endif #endif TO: #define getenv(x) NULL "third_party\libyuv\source\cpu_id.cc": FROM: #if !defined(__native_client__) && !defined(_M_ARM) TO: #if !defined(__native_client__) && !defined(_M_ARM) && 0 "webmdec.cc": FROM: mkvparser::MkvReader *const reader = new mkvparser::MkvReader(vpx_ctx->file); TO: mkvparser::IMkvReader *reader = (mkvparser::IMkvReader*)webm_ctx->reader; // ESENTHEL CHANGED 'reader' is just read from webm AND FROM: rewind(vpx_ctx->file); TO: if(vpx_ctx->file)rewind(vpx_ctx->file); // ESENTHEL CHANGED AND FROM: webm_ctx->buffer = *buffer; TO: //webm_ctx->buffer = *buffer; ESENTHEL CHANGED this shouldn't be copied because it's not used for the 'webm_ctx' anywhere, also this would cause a crash because the 'buffer' will already be released in the 'webm_guess_framerate' and 'webm_ctx->buffer' would point to invalid data !! AND REPLACE ENTIRE FUNCTION: int webm_guess_framerate(struct WebmInputContext *webm_ctx, struct VpxInputContext *vpx_ctx) { uint32_t i = 0; uint8_t *buffer = NULL; uint64_t first = 0; // ESENTHEL CHANGED size_t buffer_size = 0; while (webm_ctx->timestamp_ns < 1000000000 && i < 1+3) { // ESENTHEL CHANGED process first frame and ignore it, after that check next 3 frames, because for 30.0 fps the time stamps were "33, 33, 34" (for 100 total) so we need to stop at the right time if (webm_read_frame(webm_ctx, &buffer, &buffer_size)) { break; } ++i; if(!first)first=webm_ctx->timestamp_ns; // ESENTHEL CHANGED } // ignore the first frame because it can start at an offset vpx_ctx->framerate.numerator = (i-1) * 1000000; vpx_ctx->framerate.denominator = static_cast((webm_ctx->timestamp_ns-first) / 1000); delete[] buffer; get_first_cluster(webm_ctx); webm_ctx->block = NULL; webm_ctx->block_entry = NULL; webm_ctx->block_frame_index = 0; webm_ctx->timestamp_ns = 0; webm_ctx->reached_eos = 0; return 0; } ".gitignore" REMOVE THE FOLLOWING LINE /vpx_config.h