[Ffmpeg-devel] Image width converted from 320 to 352 pixels

Panagiotis Issaris takis.issaris
Fri Jun 9 10:41:23 CEST 2006


Ramiro Polla wrote:
> [...]
> I noticed the buffer is for 352x240 pixels. With my 320x240 image, I 
> simply lose 32 pixels every line. So every line starts shifted by 
> another 32 pixels, and the image goes short at the end. It's like if I 
> took a [320][240] array and made it [352][240], not displaying 32 
> pixels per line. Like
> [...]
> Is there something I'm missing from withing libavcodec about buffer 
> sizes or something like that?

I do not really know what structs you are using, but if you are using 
AVFrame, then besides the actual buffer data, stored in "uint8_t *data[4];"
there's also the "int linesize[4];" which is possibly 352 in your 
specific case. So, the width of the image is not necessarily the same as 
the linesize
or stride.

Hope this helps (if I understood your problem correctly in the first 
place :) ).

With friendly regards,

More information about the ffmpeg-devel mailing list