From 7958ce62d6ae127ee9b8664c8afae5754063389f Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Fri, 5 Dec 2003 15:54:56 +0000 Subject: cleanup phase II. use xprintf when it's relevant, use xine_xmalloc when it's relevant too. Small other little fix (can't remember). Change few internal function prototype because it xine_t pointer need to be used if some xine's internal sections. NOTE: libdvd{nav,read} is still too noisy, i will take a look to made it quit, without invasive changes. To be continued... CVS patchset: 5844 CVS date: 2003/12/05 15:54:56 --- src/libxinevdec/fli.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'src/libxinevdec/fli.c') diff --git a/src/libxinevdec/fli.c b/src/libxinevdec/fli.c index 98e03190d..8578e41c1 100644 --- a/src/libxinevdec/fli.c +++ b/src/libxinevdec/fli.c @@ -23,7 +23,7 @@ * avoid when implementing a FLI decoder, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: fli.c,v 1.23 2003/11/16 23:33:48 f1rmb Exp $ + * $Id: fli.c,v 1.24 2003/12/05 15:55:01 f1rmb Exp $ */ #include @@ -338,8 +338,8 @@ static void decode_fli_frame(fli_decoder_t *this) { this->ghost_image[ghost_pixel_ptr++] = palette_idx1; pixel_countdown--; if (pixel_countdown < 0) - printf ("fli warning: pixel_countdown < 0 (%d)\n", - pixel_countdown); + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "fli warning: pixel_countdown < 0 (%d)\n", pixel_countdown); } } else { /* copy bytes if byte_run < 0 */ byte_run = -byte_run; @@ -348,8 +348,8 @@ static void decode_fli_frame(fli_decoder_t *this) { this->ghost_image[ghost_pixel_ptr++] = palette_idx1; pixel_countdown--; if (pixel_countdown < 0) - printf ("fli warning: pixel_countdown < 0 (%d)\n", - pixel_countdown); + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "fli warning: pixel_countdown < 0 (%d)\n", pixel_countdown); } } } @@ -362,11 +362,10 @@ static void decode_fli_frame(fli_decoder_t *this) { /* copy the chunk (uncompressed frame) to the ghost image and * schedule the whole frame to be updated */ if (chunk_size - 6 > this->width * this->height) { - printf( - _("FLI: in chunk FLI_COPY : source data (%d bytes) bigger than" \ - " image, skipping chunk\n"), - chunk_size - 6); - break; + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, + "FLI: in chunk FLI_COPY : source data (%d bytes) bigger than image, skipping chunk\n", + chunk_size - 6); + break; } else memcpy(this->ghost_image, &this->buf[stream_ptr], chunk_size - 6); stream_ptr += chunk_size - 6; @@ -379,7 +378,8 @@ static void decode_fli_frame(fli_decoder_t *this) { break; default: - printf (_("FLI: Unrecognized chunk type: %d\n"), chunk_type); + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "FLI: Unrecognized chunk type: %d\n", chunk_type); break; } @@ -404,10 +404,9 @@ static void decode_fli_frame(fli_decoder_t *this) { /* by the end of the chunk, the stream ptr should equal the frame * size (minus 1, possibly); if it doesn't, issue a warning */ if ((stream_ptr != this->size) && (stream_ptr != this->size - 1)) - printf ( - _(" warning: processed FLI chunk where chunk size = %d\n" \ - " and final chunk ptr = %d\n"), - this->size, stream_ptr); + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, + "warning: processed FLI chunk where chunk size = %d\nand final chunk ptr = %d\n", + this->size, stream_ptr); } /************************************************************************** -- cgit v1.2.3