[MPlayer-cvslog] r33223 - trunk/gui/util/bitmap.c

ib subversion at mplayerhq.hu
Tue Apr 5 15:21:20 CEST 2011


Author: ib
Date: Tue Apr  5 15:21:20 2011
New Revision: 33223

Log:
Move debug messages.

Issue only if decoding was ok.

Modified:
   trunk/gui/util/bitmap.c

Modified: trunk/gui/util/bitmap.c
==============================================================================
--- trunk/gui/util/bitmap.c	Tue Apr  5 15:12:36 2011	(r33222)
+++ trunk/gui/util/bitmap.c	Tue Apr  5 15:21:20 2011	(r33223)
@@ -108,7 +108,12 @@ static int pngRead(unsigned char *fname,
         bf->Height = avctx->height;
         bpl = bf->Width * (bf->BPP / 8);
         bf->ImageSize = bpl * bf->Height;
-        bf->Image     = malloc(bf->ImageSize);
+
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] file: %s\n", fname);
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  size: %lux%lu, color depth: %u\n", bf->Width, bf->Height, bf->BPP);
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  image size: %lu\n", bf->ImageSize);
+
+        bf->Image = malloc(bf->ImageSize);
 
         if (bf->Image)
             memcpy_pic(bf->Image, frame->data[0], bpl, bf->Height, bpl, frame->linesize[0]);
@@ -124,10 +129,6 @@ static int pngRead(unsigned char *fname,
         return 4;
     }
 
-    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] file: %s\n", fname);
-    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  size: %lux%lu, color depth: %u\n", bf->Width, bf->Height, bf->BPP);
-    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  image size: %lu\n", bf->ImageSize);
-
     return !(decode_ok && bf->BPP);
 }
 


More information about the MPlayer-cvslog mailing list