modify (from ffmpeg.c)