I am trying to allocate AVFrame->data[0] of a video frame to uint8_t* buffer using the following lines of code :
size_t sizeOfFrameData = mpAVFrameInput->linesize[0] * mpAVFrameInput->height;
memcpy(mFrameData, mpAVFrameInput->data[0], sizeOfFrameData);
I would like to know if this is a correct way of copying frame data to uint8_t* variable in FFMPEG?