I\'m trying to convert an YUV frame to RGB using libswscale.
Here is my code :
AVFrame *RGBFrame;
SwsContext *ConversionContext;
ConversionContext =
av_frame_alloc
only allocates memory for the frame object itself, it does not allocate memory to store the image data. Have you done:
FillVect.resize( avpicture_get_size( PIX_FMT_RGB24, FrameWidth, FrameHeight ) );
somewhere in your code before calling avpicture_fill
? Or some other way to make sure FillVect allocates enough memory to keep the whole decoded picture?
Did you try to run it under valgrind to see what exactly trigges SEGFAULT?