comparison imgutils.c @ 10:356600e12af7 libavcore

Make av_fill_image_linesizes() return a meaningful error core rather than -1.
author stefano
date Fri, 30 Jul 2010 08:42:15 +0000
parents 4cecefd36670
children dabaa2056109
comparison
equal deleted inserted replaced
9:4cecefd36670 10:356600e12af7
32 int max_step_comp[4]; /* the component for each plane which has the max pixel step */ 32 int max_step_comp[4]; /* the component for each plane which has the max pixel step */
33 33
34 memset(linesize, 0, 4*sizeof(linesize[0])); 34 memset(linesize, 0, 4*sizeof(linesize[0]));
35 35
36 if (desc->flags & PIX_FMT_HWACCEL) 36 if (desc->flags & PIX_FMT_HWACCEL)
37 return -1; 37 return AVERROR(EINVAL);
38 38
39 if (desc->flags & PIX_FMT_BITSTREAM) { 39 if (desc->flags & PIX_FMT_BITSTREAM) {
40 linesize[0] = (width * (desc->comp[0].step_minus1+1) + 7) >> 3; 40 linesize[0] = (width * (desc->comp[0].step_minus1+1) + 7) >> 3;
41 return 0; 41 return 0;
42 } 42 }