# HG changeset patch # User ib # Date 1302009680 0 # Node ID 07be88814256c4a76bd3495b855bdd617a4038c4 # Parent 36fdc061b4a813b2c4c4c08c50f623ff86c17cea Move debug messages. Issue only if decoding was ok. diff -r 36fdc061b4a8 -r 07be88814256 gui/util/bitmap.c --- 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); }