From: Daniel Caujolle-B. <f1...@us...> - 2003-12-07 15:34:34
|
Update of /cvsroot/xine/xine-lib/src/dxr3 In directory sc8-pr-cvs1:/tmp/cvs-serv21525/src/dxr3 Modified Files: dxr3_decode_spu.c dxr3_spu_encoder.c Log Message: get rid of XINE_{ASSERT,ABORT} and useless xine_print_trace (useless). Replace XINE_ASSERT by _x_assert, which works exaclty as assert, except that it still warns with NDEBUG defined (but don't abort). Fix missuning of assert(0), which isn't safe, abort is abort, assert is for debugging purpose only, so all assert(0) has been converted to abort() alls. In osd_preload_fonts(): alloc needed memory chunk. Define NDEBUG in CFLAGS, for non DEBUG build only. Index: dxr3_decode_spu.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/dxr3/dxr3_decode_spu.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- dxr3_decode_spu.c 5 Dec 2003 15:54:57 -0000 1.41 +++ dxr3_decode_spu.c 7 Dec 2003 15:34:29 -0000 1.42 @@ -354,8 +354,10 @@ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "dxr3_decode_spu: failed to set spu button (%s)\n", strerror(errno)); pthread_mutex_unlock(&this->dxr3_vo->spu_device_lock); - } else - XINE_ASSERT(0, "no working menu button found"); + } else { + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "no working menu button found\n"); + abort(); + } } } @@ -616,7 +618,8 @@ if (!button_ptr && this->pci.hli.hl_gi.btngr_ns >= 3 && (this->pci.hli.hl_gi.btngr3_dsp_ty & 2)) button_ptr = &this->pci.hli.btnit[2 * btns_per_group + this->buttonN - 1]; - XINE_ASSERT(button_ptr, "No suitable letterbox button group found."); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "No suitable letterbox button group found.\n"); + _x_assert(button_ptr); } else { unsigned int btns_per_group = 36 / this->pci.hli.hl_gi.btngr_ns; Index: dxr3_spu_encoder.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/dxr3/dxr3_spu_encoder.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dxr3_spu_encoder.c 5 Dec 2003 15:54:58 -0000 1.3 +++ dxr3_spu_encoder.c 7 Dec 2003 15:34:29 -0000 1.4 @@ -382,7 +382,7 @@ } /* we should be byte aligned here */ - XINE_ASSERT(higher_nibble, "bad state during spu encoding"); + _x_assert(higher_nibble); /* control sequence starts here */ this->target[2] = offset >> 8; @@ -467,7 +467,7 @@ write_nibble(this, offset, higher_nibble, (length & 0xc) | color); return; } - XINE_ASSERT(0, "bad state during spu encoding"); + abort(); } static void write_byte(spu_encoder_t *this, int *offset, uint8_t byte) |