[MPlayer-dev-eng] [PATCH] vfw fixes

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Sep 16 10:12:09 CEST 2007


Hello,
On Sun, Sep 16, 2007 at 05:04:11AM +0200, Gianluigi Tiesi wrote:
> xx_vfw_icclose.diff adds the proper close routine on the vfw driver
> xx_vfw_coinit.diff windows only, calls coinitialize() and
> couninitialize() that may be needed for some dlls
> coinit is need for most dialogs of vfw codecs

So is this windows only because it is only needed there or because we
don't have it on Linux?

> +static void uninit(struct vf_instance_s* vf)
> +{
> +    HRESULT ret;
> +
> +    if(encoder_hic){
> +	if(encoder_buf){
> +	    ret=ICCompressEnd(encoder_hic);
> +	    if(ret){
> +		mp_msg(MSGT_WIN32, MSGL_WARN, "ICCompressEnd failed: %ld\n", ret);
> +		/* return; */
> +	    }
> +	    free(encoder_buf);
> +	    encoder_buf=NULL;
> +	}
> +	
> +	ret=ICClose(encoder_hic);
> +	if(ret){
> +	    mp_msg(MSGT_WIN32, MSGL_WARN, "ICClose failed: %ld\n", ret);
> +	    return;
> +	}
> +	encoder_hic=0;
> +    }
> +}

That ret variable is pointless. I see that the other code in the file
enjoys using variables pointlessly but that's no reason to do it here as
well.
I also can't see how that commented-out return should ever make sense
unless maybe you move the free() up, so please remove it.
ve_vfw also uses almost no tabs, so please remove them from your
new code.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list