Thank you so much. It worked, just remove '&'. I declared it as a
pointer but I did not notify it.
On 8/2/2010 2:27 PM, avcoder wrote:
On Mon, Aug 2, 2010 at 3:14 PM, Hoang Ong<[email protected]> wrote:
Thank you for your help but It still doesn't work, It cannot pass the
sws_scale function.
buffer = (uint8_t *)av_malloc(sizeBuffer);
avpicture_fill((AVPicture*)&pFrameRGB,buffer,
PIX_FMT_RGB24,pCodecCtx->width,
pCodecCtx->height);
I double checked your code:
AVFrame *pFrameRGB;
pFrameRGB=avcodec_alloc_frame();
avpicture_fill((AVPicture*)&pFrameRGB,buffer, PIX_FMT_RGB24,pCodecCtx->width,
pCodecCtx->height);
(AVPicture*)&pFrameRGB is wrong, the '&' should be removed
Never touch C++ if you are not familiar with C
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user