comparison flicvideo.c @ 4539:956ccc32d4e9 libavcodec

display line number when printing error
author alex
date Sun, 18 Feb 2007 01:02:34 +0000
parents 05e932ddaaa9
children e112ff86e261
comparison
equal deleted inserted replaced
4538:e64290e64366 4539:956ccc32d4e9
353 CHECK_PIXEL_PTR(byte_run); 353 CHECK_PIXEL_PTR(byte_run);
354 for (j = 0; j < byte_run; j++) { 354 for (j = 0; j < byte_run; j++) {
355 pixels[pixel_ptr++] = palette_idx1; 355 pixels[pixel_ptr++] = palette_idx1;
356 pixel_countdown--; 356 pixel_countdown--;
357 if (pixel_countdown < 0) 357 if (pixel_countdown < 0)
358 av_log(avctx, AV_LOG_ERROR, "pixel_countdown < 0 (%d)\n", 358 av_log(avctx, AV_LOG_ERROR, "pixel_countdown < 0 (%d) at line %d\n",
359 pixel_countdown); 359 pixel_countdown, lines);
360 } 360 }
361 } else { /* copy bytes if byte_run < 0 */ 361 } else { /* copy bytes if byte_run < 0 */
362 byte_run = -byte_run; 362 byte_run = -byte_run;
363 CHECK_PIXEL_PTR(byte_run); 363 CHECK_PIXEL_PTR(byte_run);
364 for (j = 0; j < byte_run; j++) { 364 for (j = 0; j < byte_run; j++) {
365 palette_idx1 = buf[stream_ptr++]; 365 palette_idx1 = buf[stream_ptr++];
366 pixels[pixel_ptr++] = palette_idx1; 366 pixels[pixel_ptr++] = palette_idx1;
367 pixel_countdown--; 367 pixel_countdown--;
368 if (pixel_countdown < 0) 368 if (pixel_countdown < 0)
369 av_log(avctx, AV_LOG_ERROR, "pixel_countdown < 0 (%d)\n", 369 av_log(avctx, AV_LOG_ERROR, "pixel_countdown < 0 (%d) at line %d\n",
370 pixel_countdown); 370 pixel_countdown, lines);
371 } 371 }
372 } 372 }
373 } 373 }
374 374
375 y_ptr += s->frame.linesize[0]; 375 y_ptr += s->frame.linesize[0];
561 CHECK_PIXEL_PTR(byte_run); 561 CHECK_PIXEL_PTR(byte_run);
562 for (j = 0; j < byte_run; j++) { 562 for (j = 0; j < byte_run; j++) {
563 pixels[pixel_ptr++] = palette_idx1; 563 pixels[pixel_ptr++] = palette_idx1;
564 pixel_countdown--; 564 pixel_countdown--;
565 if (pixel_countdown < 0) 565 if (pixel_countdown < 0)
566 av_log(avctx, AV_LOG_ERROR, "pixel_countdown < 0 (%d)\n", 566 av_log(avctx, AV_LOG_ERROR, "pixel_countdown < 0 (%d) (linea%d)\n",
567 pixel_countdown); 567 pixel_countdown, lines);
568 } 568 }
569 } else { /* copy bytes if byte_run < 0 */ 569 } else { /* copy bytes if byte_run < 0 */
570 byte_run = -byte_run; 570 byte_run = -byte_run;
571 CHECK_PIXEL_PTR(byte_run); 571 CHECK_PIXEL_PTR(byte_run);
572 for (j = 0; j < byte_run; j++) { 572 for (j = 0; j < byte_run; j++) {
573 palette_idx1 = buf[stream_ptr++]; 573 palette_idx1 = buf[stream_ptr++];
574 pixels[pixel_ptr++] = palette_idx1; 574 pixels[pixel_ptr++] = palette_idx1;
575 pixel_countdown--; 575 pixel_countdown--;
576 if (pixel_countdown < 0) 576 if (pixel_countdown < 0)
577 av_log(avctx, AV_LOG_ERROR, "pixel_countdown < 0 (%d)\n", 577 av_log(avctx, AV_LOG_ERROR, "pixel_countdown < 0 (%d) at line %d\n",
578 pixel_countdown); 578 pixel_countdown, lines);
579 } 579 }
580 } 580 }
581 } 581 }
582 582
583 /* Now FLX is strange, in that it is "byte" as opposed to "pixel" run length compressed. 583 /* Now FLX is strange, in that it is "byte" as opposed to "pixel" run length compressed.