I get Frames in loop and decode it with ffmpeg getting AVFrame as e result of it.
So I must get neccessary pixel data of frame into char* and give as a callback function's parameter. So how I can generete such char* array? In internet I saw some examples such as:
for(y=0; y<height; y++)
{
fwrite(pFrame->data[0]+y*pFrame->linesize[0], 1, width*3, pFile);
}
or something like this. Is it true? And which size would be my char* ? As I see we write width*3 *height bytes?