[MPlayer-users] Encoding from .png images

Matthias Goerner m.goerner at iu-bremen.de
Fri Nov 7 21:18:15 CET 2003


Hello,

I wanted to encode several png images and found a bug in 
mplayer/mencoder: A strange image appears indicating that vd_mpng.c 
writes RGB- or BGR-data which are then interpreted as RGBA- or BGRA-image.

So I simply replaced the control function in libmpcodecs/vd_mpng.c by:

static int control(sh_video_t *sh,int cmd,void* arg,...){
    switch (cmd)
    {
     case VDCTRL_QUERY_FORMAT:
        if (*((int *) arg) == out_fmt) return CONTROL_TRUE;
        return CONTROL_FALSE;
    }
    return CONTROL_UNKNOWN;
}

[I copied this code from libmpcodecs/vd_mtga.c.]

Since I am not that familiar with the internal structures of mplayer, I 
want to know: Are there any side-effects?

Best wishes,
       Matthias



More information about the MPlayer-users mailing list