title: FFMpeg(Android) av_read_frame or avcodec_decode_video2 returning same colour
body: <p>I've been experimenting FFMpeg for the past 2 weeks and I'm having a bit of trouble...
  First I've been working with a Galaxy S3, which worked super fine, gave me the best pictures ever but I recently switched to a Galaxy NEXUS which gave me a bunch of problems...</p>
  
  <p>What I'm doing : I just extract frame from a video</p>
  
  <p>How I'm doing :</p>
  
  <pre><code>while(av_read_frame(gFormatCtx, &amp;packet)&gt;=0)
          {
              // Is this a packet from the video stream?
              if(packet.stream_index==videoStream)
              {
                  // Decode video frame
                  avcodec_decode_video2(gVideoCodecCtx, pFrame, &amp;frameFinished, &amp;packet);
                  // Did we get a video frame?
                  if(frameFinished)
                  {//and so on... But our problem is already here...
  </code></pre>
  
  <p>Ok, now <code>pFrame</code> is holding a YUV representation of my frame... So, in order to check what I'm getting from the <code>avcodec_decode_video2(...)</code> function I'm just writing <code>pFrame</code> to a file so I can see it with any YUV reader on the web.</p>
  
  <pre><code>char yuvFileName[100];
  sprintf(yuvFileName,"/storage/sdcard0/yuv%d.yuv",index);
  FILE* fp = fopen(yuvFileName, "wb");
  int y;
  // Write pixel data
  for(y=0; y&lt;gVideoCodecCtx-&gt;height; y++)
  {
      fwrite(pFrame-&gt;data[0]+y*pFrame-&gt;linesize[0], 1, gVideoCodecCtx-&gt;width, fp);    
  }
  for(y=0; y&lt;gVideoCodecCtx-&gt;height/2; y++)
  {
      fwrite(pFrame-&gt;data[1]+y*pFrame-&gt;linesize[1], 1, gVideoCodecCtx-&gt;width/2, fp);
  }
  for(y=0; y&lt;gVideoCodecCtx-&gt;height/2; y++)
  {
      fwrite(pFrame-&gt;data[2]+y*pFrame-&gt;linesize[2], 1, gVideoCodecCtx-&gt;width/2, fp);
  }
  fclose(fp);
  </code></pre>
  
  <p>Ok so Here I now have my result on a file store @ <code>/storage/sdcard0/blabla.YUV</code> on my Galaxy Nexus root memory.</p>
  
  <p>But If I open the file with (for example XnView, which is meant to display YUV type properly) I only see Dark green on the picture.</p>
  
  <p>What bothers me is that everything worked properly on Galaxy S3 but something failed on GNexus...</p>
  
  <p>So here's my question : Why doesn't it work on Galaxy Nexus ?</p>
  
  <p>Compatibility problem between Gnexus and armeabiv7 ?</p>
  
  <p>I don't know !</p>
  
  <p>Regards,
  Cehm</p>