[MPlayer-cvslog] r38094 - trunk/gui/util/bitmap.c
ib
subversion at mplayerhq.hu
Sun Apr 15 12:48:00 EEST 2018
Author: ib
Date: Sun Apr 15 12:48:00 2018
New Revision: 38094
Log:
Remove checks for unsupported pixel formats.
It makes no sense to check for pixel formats
and copy images which will be rejected later
in bpRead() anyway.
Additionally, change the debug message.
Modified:
trunk/gui/util/bitmap.c
Modified: trunk/gui/util/bitmap.c
==============================================================================
--- trunk/gui/util/bitmap.c Fri Apr 13 17:08:24 2018 (r38093)
+++ trunk/gui/util/bitmap.c Sun Apr 15 12:48:00 2018 (r38094)
@@ -141,14 +141,6 @@ static int pngRead(const char *fname, gu
memset(img, 0, sizeof(*img));
switch (avctx->pix_fmt) {
- case AV_PIX_FMT_GRAY8:
- img->Bpp = 8;
- break;
-
- case AV_PIX_FMT_GRAY16BE:
- img->Bpp = 16;
- break;
-
case AV_PIX_FMT_RGB24:
img->Bpp = 24;
break;
@@ -159,6 +151,7 @@ static int pngRead(const char *fname, gu
default:
img->Bpp = 0;
+ mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] unsupported pixel format: %d\n", avctx->pix_fmt);
break;
}
@@ -258,10 +251,8 @@ int bpRead(const char *fname, guiImage *
return -5;
}
- if (img->Bpp < 24) {
- mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] bpp too low: %u\n", img->Bpp);
+ if (!img->Bpp)
return -1;
- }
if (!convert_ARGB(img))
return -8;
More information about the MPlayer-cvslog
mailing list