comparison msvideo1.c @ 1598:932d306bf1dc libavcodec

av_log() patch by (Michel Bardiaux <mbardiaux at peaktime dot be>)
author michael
date Mon, 03 Nov 2003 13:26:22 +0000
parents b2fecae88e84
children 9ef0d51e809b
comparison
equal deleted inserted replaced
1597:4c9165372ab3 1598:932d306bf1dc
40 40
41 #define PALETTE_COUNT 256 41 #define PALETTE_COUNT 256
42 #define LE_16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0]) 42 #define LE_16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
43 #define CHECK_STREAM_PTR(n) \ 43 #define CHECK_STREAM_PTR(n) \
44 if ((stream_ptr + n) > s->size ) { \ 44 if ((stream_ptr + n) > s->size ) { \
45 printf (" MS Video-1 warning: stream_ptr out of bounds (%d >= %d)\n", \ 45 av_log(s->avctx, AV_LOG_ERROR, " MS Video-1 warning: stream_ptr out of bounds (%d >= %d)\n", \
46 stream_ptr + n, s->size); \ 46 stream_ptr + n, s->size); \
47 return; \ 47 return; \
48 } 48 }
49 49
50 #define COPY_PREV_BLOCK() \ 50 #define COPY_PREV_BLOCK() \
320 320
321 s->buf = buf; 321 s->buf = buf;
322 s->size = buf_size; 322 s->size = buf_size;
323 323
324 if (avctx->get_buffer(avctx, &s->frame)) { 324 if (avctx->get_buffer(avctx, &s->frame)) {
325 printf (" MS Video-1 Video: get_buffer() failed\n"); 325 av_log(s->avctx, AV_LOG_ERROR, " MS Video-1 Video: get_buffer() failed\n");
326 return -1; 326 return -1;
327 } 327 }
328 328
329 if (s->prev_frame.data[0] &&(s->frame.linesize[0] != s->prev_frame.linesize[0])) 329 if (s->prev_frame.data[0] &&(s->frame.linesize[0] != s->prev_frame.linesize[0]))
330 printf (" MS Video-1: Buffer linesize changed: current %u, previous %u.\n" 330 av_log(avctx, AV_LOG_ERROR, " MS Video-1: Buffer linesize changed: current %u, previous %u.\n"
331 " Expect wrong image and/or crash!\n", 331 " Expect wrong image and/or crash!\n",
332 s->frame.linesize[0], s->prev_frame.linesize[0]); 332 s->frame.linesize[0], s->prev_frame.linesize[0]);
333 333
334 if (s->mode_8bit) 334 if (s->mode_8bit)
335 msvideo1_decode_8bit(s); 335 msvideo1_decode_8bit(s);