In mplayer2, it was valid to try to start encoding before all streams
were initialized. mpv avoids this situation and thus allows us to
properly bail out on some kinds of failures.
Also, this commit fixes a missing check in ao uninit which could cause
heap corruption when ao initialization did not complete.
Apparently, libav doesn't have the change for the new way to create a
libavformat context merged yet. So, we can't use that...
Rather, this commit fixes format specific avoptions another way.
On the downside, invalid format options are now detected very late, and
any attempt to set an option value to +something or -something will
append to the previously set option value (this logic can no longer be
specific to options of bitflag type, as finding out the option type is
what we simply cannot do with this interface).
This allows to define which stream is to be used as first output stream.
This is useful because dvdauthor refuses VOB files where the audio
stream is the first stream.