Patches attached, ffmpeg.c should really not ignore initial padding and trailing padding.