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.
avfilter/lavfutils/ff_load_image: Return error if no frame could be decoded

Based-on suggestion by JULIAN GARDNER <joolzg@btinternet.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>