title: FFMPEG: Dumping YUV data into AVFrame structure
body: <p>I'm trying to dump a <code>YUV420</code> data into the <code>AVFrame</code> structure of FFMPEG. From the below link:</p>
  
  <p><a href="http://ffmpeg.org/doxygen/trunk/structAVFrame.html" rel="noreferrer">http://ffmpeg.org/doxygen/trunk/structAVFrame.html</a>, i can derive that i need to put my data into </p>
  
  <pre><code>data[AV_NUM_DATA_POINTERS] 
  </code></pre>
  
  <p>using </p>
  
  <pre><code>linesize [AV_NUM_DATA_POINTERS].
  </code></pre>
  
  <p>The YUV data i'm trying to dump is YUV420 and the picture size is <code>416x240.</code> 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.</p>