http://bugs.winehq.org/show_bug.cgi?id=31029
--- Comment #10 from Dmitry Timoshkov dmitry@baikal.ru 2012-06-27 11:19:02 CDT --- (In reply to comment #9)
If a preferred vendor is specified, the loop runs first trying only decoders from the preferred vendor. If that fails, the loop runs again trying all decoders. The first decoder to successfully initialize is immediately returned.
Then I'd factor out the decoder search into a separate helper to avoid a needless goto:
decoder = find_decoder(preferred_vendor, stream); if (!decoder) decoder = find_decoder(NULL, stream); return decoder;