MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / aligned_malloc

Function aligned_malloc

src/FFmpegUtilities.h:410–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408#endif
409
410inline static void* aligned_malloc(size_t size, size_t alignment = 32)
411{
412#if defined(_WIN32)
413 return _aligned_malloc(size, alignment);
414#elif defined(__APPLE__) || defined(__linux__)
415 void* ptr = nullptr;
416 if (posix_memalign(&ptr, alignment, size) != 0)
417 return nullptr;
418 return ptr;
419#else
420#error "aligned_malloc not implemented on this platform"
421#endif
422}
423
424#endif // OPENSHOT_FFMPEG_UTILITIES_H

Callers 1

ProcessVideoPacketMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected