title: ffmpeg av_seek_frame with AVSEEK_FLAG_ANY causes grey screen
body: <p><strong>Problem:</strong>
  omxplayer's source code calls the ffmpeg <code>av_seek_frame()</code> method using the <code>AVSEEK_FLAG_BACKWARD</code> flag. Although not 100% sure, I believe this seeks to the closest i-frame. Instead, I want to seek to exact locations, so I modified the source code such that the <code>av_seek_frame()</code> method now uses the <code>AVSEEK_FLAG_ANY</code> flag. Now, when the movie loads, I get a grey screen, generally for 1 second, during which I can hear the audio. I have tried this on multiple computers (I am actually synchronizing them, therefore, at the same time too) so it is not a n isolated incident. My guess is that seeking to non i-frames is computationally more expensive, resulting in the initial grey screen.</p>
  
  <p><strong>Question:</strong> How, using ffmpeg, can I instruct the audio to wait until the video is ready before proceeding.</p>