[MPlayer-dev-eng] PATCH - PNG transparency in vo_png.c

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Nov 13 20:08:30 CET 2008


On Thu, Nov 13, 2008 at 11:47:46AM -0500, it at tidetamerboatlifts.com wrote:
> --- MPlayer-1.0rc2-orig/libvo/vo_png.c	2007-10-07 15:49:28.000000000 -0400
> +++ MPlayer-1.0rc2/libvo/vo_png.c	2008-11-13 08:53:39.000000000 -0500
> @@ -111,7 +111,7 @@
>         bit_depth, color_type, interlace_type,
>         compression_type, filter_type)*/
>      png_set_IHDR(png.png_ptr, png.info_ptr, image_width, image_height,
> -       8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
> +       8, PNG_COLOR_TYPE_RGBA, PNG_INTERLACE_NONE,

That breaks for the 24 bit formats.

> @@ -193,6 +193,7 @@
>      switch(format){
>      case IMGFMT_RGB|24:
>      case IMGFMT_BGR|24:
> +    case IMGFMT_RGBA|32:
>          return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_ACCEPT_STRIDE;

And this should be just IMGFMT_RGBA (without |32). Ideally someone
should check on little- and big-endian that is is the right one and not
e.g. IMGFMT_RGB32.



More information about the MPlayer-dev-eng mailing list