decoder/ffmpeg: log detailed error message
decoder/ffmpeg: fix crash on out-of-memory

Fixes regression by commit 7c8038e
decoder/ffmpeg: move code to class FfmpegBuffer