Hi Guys, I met a crash when doing image conversion (just pixel format conversion, no resizing).
sws_context is got using sws_getContext (I also tried sws_getCachedContext) code fragment is here: pFrameConverted = avcodec_alloc_frame(); int numBytes = avpicture_get_size(LPixelFormatToFFMPEG(vfSource.pf), vfSource.iWidth, vfSource.iHeight); buffer = (uint8_t *)av_malloc(numBytes*sizeof(uint8_t)); avpicture_fill((AVPicture *)pFrameConverted, buffer, LPixelFormatToFFMPEG(vfSource.pf), vfSource.iWidth, vfSource.iHeight); // pCurrentFrame is the AVFrame object returned by av_decode_video2 sws_scale(pSwsContext, pCurrentFrame->data, pCurrentFrame->linesize, 0, vfSource.iHeight, pFrameConverted->data, pFrameConverted->linesize) ; sws_scale crashes randomly (crashes in different frames). Can anyone provide any idea on this? Thanks
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
