[Libav-user] Converting yuvj420p to AV_PIX_FMT_BGRA
for_rmcer at hotmail.com
Tue May 10 21:21:39 CEST 2016
>> When the streaming is coming in as 320X240, it converts to
>> AV_PIX_FMT_BGRA without problems. However, if it is coming
>> in as 432x240, the converted image is full of white, gray,
>> and black slanted horizontal lines.
> Either linesize or width is incorrectly set.
The width and height are set to be the same as the source. I didn't set any linesize in my code. I have the following code
int numBytes = avpicture_get_size(imgPixFormat, vp->width, vp->height);
vp->bmp = new uint8_t[numBytes*sizeof(uint8_t)];
avpicture_fill((AVPicture *)vp->frame, vp->bmp, imgPixFormat, vp->width, vp->height);
vp>frame is AVFrame*
vp->bmp is uint8__t*
width and height are int;
Or do I need to set my linesize?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user