diff options
author | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2003-12-07 15:34:29 +0000 |
---|---|---|
committer | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2003-12-07 15:34:29 +0000 |
commit | c8fdff20285b59cd892297317572fbb4c3633f78 (patch) | |
tree | 102be6141b635eb2bff16358ca13b79924b211f4 /src/video_out | |
parent | a2dcf860b2777e530646abd00202c3fb5b3a5a81 (diff) | |
download | xine-lib-c8fdff20285b59cd892297317572fbb4c3633f78.tar.gz xine-lib-c8fdff20285b59cd892297317572fbb4c3633f78.tar.bz2 |
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.
CVS patchset: 5860
CVS date: 2003/12/07 15:34:29
Diffstat (limited to 'src/video_out')
-rw-r--r-- | src/video_out/alphablend.c | 3 | ||||
-rw-r--r-- | src/video_out/video_out_directfb.c | 6 | ||||
-rw-r--r-- | src/video_out/video_out_opengl.c | 10 | ||||
-rw-r--r-- | src/video_out/yuv2rgb_mlib.c | 9 |
4 files changed, 15 insertions, 13 deletions
diff --git a/src/video_out/alphablend.c b/src/video_out/alphablend.c index 111f3fee3..f640fa38a 100644 --- a/src/video_out/alphablend.c +++ b/src/video_out/alphablend.c @@ -462,8 +462,7 @@ void blend_rgb16 (uint8_t * img, vo_overlay_t * img_overl, } break; case 6: /* Finished */ - XINE_ASSERT(0,"Don't ever get here\n"); - /* This case will not fall through, XINE_ASSERT contains a call to abort() */ + abort(); case 7: /* No button */ clut = (clut_t*) img_overl->color; diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index 63b099200..0ebd3ffe9 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_directfb.c,v 1.24 2003/12/05 15:55:03 f1rmb Exp $ + * $Id: video_out_directfb.c,v 1.25 2003/12/07 15:34:30 f1rmb Exp $ * * DirectFB based output plugin. * Rich Wareham <richwareham@users.sourceforge.net> @@ -353,8 +353,8 @@ static void directfb_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen if( !overlay->rgb_clut || !overlay->clip_rgb_clut) directfb_overlay_clut_yuv2rgb(this,overlay); - XINE_ASSERT (this->delivered_width == frame->width, "Delivered frame width does not match desired width"); - XINE_ASSERT (this->delivered_height == frame->height, "Delivered frame height does not match desire height"); + _x_assert(this->delivered_width == frame->width); + _x_assert(this->delivered_height == frame->height); # if BYTES_PER_PIXEL == 3 blend_rgb24 ((uint8_t *)frame->texture, overlay, frame->width, frame->height, diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index be8be58ca..cc870ea1b 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_opengl.c,v 1.33 2003/12/05 15:55:03 f1rmb Exp $ + * $Id: video_out_opengl.c,v 1.34 2003/12/07 15:34:30 f1rmb Exp $ * * video_out_glut.c, glut based OpenGL rendering interface for xine * Matthias Hopf <mat@mshopf.de> @@ -339,7 +339,7 @@ static void opengl_update_frame_format (vo_driver_t *this_gen, frame->chunk[0] = frame->chunk[1] = frame->chunk[2] = NULL; frame->texture = calloc (1, BYTES_PER_PIXEL * image_size); - XINE_ASSERT(frame->texture, "Frame texture is NULL"); + _x_assert(frame->texture); switch (format) { case XINE_IMGFMT_YV12: @@ -545,7 +545,7 @@ static void opengl_render_image (opengl_driver_t *this, opengl_frame_t *frame, GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, None } ; - XINE_ASSERT (this->vinfo, "this->vinfo is NULL"); + _x_assert(this->vinfo); if ((this->context_state == CONTEXT_SAME_DRAWABLE) && (self == this->renderthread)) @@ -565,7 +565,7 @@ static void opengl_render_image (opengl_driver_t *this, opengl_frame_t *frame, ctx = glXCreateContext (this->display, this->vinfo, NULL, True); DEBUGF ((stderr, "created\n")); - XINE_ASSERT(ctx, "ctx is NULL"); + _x_assert(ctx); this->context = ctx; this->context_state = CONTEXT_RELOAD; @@ -925,7 +925,7 @@ static vo_driver_t *opengl_open_plugin (video_driver_class_t *class_gen, * allocate plugin struct */ this = calloc (1, sizeof (opengl_driver_t)); - XINE_ASSERT (this, "OpenGL driver struct is not defined"); + _x_assert(this); this->config = class->config; this->xine = class->xine; diff --git a/src/video_out/yuv2rgb_mlib.c b/src/video_out/yuv2rgb_mlib.c index e1a7cba7d..d1c0d1ff5 100644 --- a/src/video_out/yuv2rgb_mlib.c +++ b/src/video_out/yuv2rgb_mlib.c @@ -83,7 +83,8 @@ static void mlib_yuv420_rgb24 (yuv2rgb_t *this, dy = 0; dst_height = this->next_slice (this, &image); - XINE_ASSERT((this->dest_width&1) == 0, "mlib needs an even YUV2 width."); + /* mlib needs an even YUV2 width. */ + _x_assert((this->dest_width&1) == 0); for (;;) { scale_line (pu, this->u_buffer, @@ -161,7 +162,8 @@ static void mlib_yuv420_argb32 (yuv2rgb_t *this, dy = 0; dst_height = this->next_slice (this, &image); - XINE_ASSERT((this->dest_width&1) == 0, "mlib needs an even YUV2 width"); + /* mlib needs an even YUV2 width */ + _x_assert((this->dest_width&1) == 0); for (;;) { scale_line (pu, this->u_buffer, @@ -239,7 +241,8 @@ static void mlib_yuv420_abgr32 (yuv2rgb_t *this, dy = 0; dst_height = this->next_slice (this, &image); - XINE_ASSERT ((this->dest_width&1) == 0, "mlib needs an even YUV2 width."); + /* mlib needs an even YUV2 width */ + _x_assert((this->dest_width&1) == 0); for (;;) { scale_line (pu, this->u_buffer, |