fixed crash bug with certain video frame sizes; this bug is happening only on osx and is likely something to do with the usage of deprecated ffmpeg functionality; I've modified the code to use the new ffmpeg way of allocating frames and filling their buffers