ffmpeg: look for encoding options in both avcodec and avformat

This patch is the same as 8a1714ad85dd5defdf1fb2baba9ababebfa47d01 but
applied to encoding. It fixes the current clash of the -password option
between tta decoder and the icecast protocol.
