comparison gui/util/bitmap.c @ 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
comparison
equal deleted inserted replaced
33135:36fdc061b4a8 33136:07be88814256
106 if (decode_ok && bf->BPP) { 106 if (decode_ok && bf->BPP) {
107 bf->Width = avctx->width; 107 bf->Width = avctx->width;
108 bf->Height = avctx->height; 108 bf->Height = avctx->height;
109 bpl = bf->Width * (bf->BPP / 8); 109 bpl = bf->Width * (bf->BPP / 8);
110 bf->ImageSize = bpl * bf->Height; 110 bf->ImageSize = bpl * bf->Height;
111 bf->Image = malloc(bf->ImageSize); 111
112 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] file: %s\n", fname);
113 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] size: %lux%lu, color depth: %u\n", bf->Width, bf->Height, bf->BPP);
114 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] image size: %lu\n", bf->ImageSize);
115
116 bf->Image = malloc(bf->ImageSize);
112 117
113 if (bf->Image) 118 if (bf->Image)
114 memcpy_pic(bf->Image, frame->data[0], bpl, bf->Height, bpl, frame->linesize[0]); 119 memcpy_pic(bf->Image, frame->data[0], bpl, bf->Height, bpl, frame->linesize[0]);
115 } 120 }
116 121
121 126
122 if (decode_ok && bf->BPP && !bf->Image) { 127 if (decode_ok && bf->BPP && !bf->Image) {
123 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", bf->ImageSize); 128 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", bf->ImageSize);
124 return 4; 129 return 4;
125 } 130 }
126
127 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] file: %s\n", fname);
128 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] size: %lux%lu, color depth: %u\n", bf->Width, bf->Height, bf->BPP);
129 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] image size: %lu\n", bf->ImageSize);
130 131
131 return !(decode_ok && bf->BPP); 132 return !(decode_ok && bf->BPP);
132 } 133 }
133 134
134 static int Convert24to32(txSample *bf) 135 static int Convert24to32(txSample *bf)