tony2001 / ffmpeg-php

PHP extension for video editing, wrapping ffmpeg
GNU General Public License v2.0
84 stars 62 forks source link

Some significant fixes for ffmpeg-php #6

Open animetrics opened 11 years ago

animetrics commented 11 years ago

Hi,

I've been trying to fix some fairly serious issues in this library for a while. It began with a significant decoding memory leak that we found (basically leaked an avframe for each decoded frame), which then led to discovery of another leak, and then further issues with random results on different machines and incorrect pts calculations. Also, we use this library from windows so I updated it to be C89 backwards compatible (since MSVC9 is not C99 compatible) and added a config.w32 for standard php extension compilation on windows. For the random results issue you can reference the following issue: https://github.com/chelyaev/ffmpeg-tutorial/issues/7

These are significant fixes for anyone who might use the library to do anything mildly serious. I haven't tested on linux or OSX but it should compile. On windows, I have been testing with ffmpeg-1.2. Lastly, we have seen what appear to be threading issues with this library, so it should be used with non-thread safe versions of PHP.

Best, Marc