FFMPEG: Dumping YUV data into AVFrame structure

Viewed 17773

I'm trying to dump a YUV420 data into the AVFrame structure of FFMPEG. From the below link:

http://ffmpeg.org/doxygen/trunk/structAVFrame.html, i can derive that i need to put my data into

data[AV_NUM_DATA_POINTERS] 

using

linesize [AV_NUM_DATA_POINTERS].

The YUV data i'm trying to dump is YUV420 and the picture size is 416x240. So how do i dump/map this yuv data to AVFrame structures variable? Iknow that linesize represents the stride i.e. i suppose the width of my picture, I have tried with some combinations but do not get the output.I kindly request you to help me map the buffer. Thanks in advance.

2 Answers
Related