The avs2avi code is nearly perfect, except it sets lKey to 15 for some odd reason. Better to set it to 0 to let the codec decide. MSDN is typically vague when if you look up the COMPVARS structure; it says the lpbiOut member must be filled out, but setting it to NULL is acceptable.
Code would need to be added to make sure the codec returned by ICOpen actually accepts the input format (bih). This could be done with a call to ICCompressQuery.
If nobody else is up to it, I'll be able to do these changes in a few hours time.
|