ffmpeg: use av_asprintf() in opt_old2new() and fix a memleak.