changeset 33136:07be88814256

Move debug messages. Issue only if decoding was ok.
author ib
date Tue, 05 Apr 2011 13:21:20 +0000
parents 36fdc061b4a8
children f884fb919ac5
files gui/util/bitmap.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gui/util/bitmap.c	Tue Apr 05 13:12:36 2011 +0000
+++ b/gui/util/bitmap.c	Tue Apr 05 13:21:20 2011 +0000
@@ -108,7 +108,12 @@
         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 @@
         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);
 }