title: av_interleaved_write_frame return 0 but no data written
body: <p>I use the ffmpeg to stream the encoded aac data , i use the</p>
  <pre><code>av_interleaved_write_frame()
  </code></pre>
  <p>to write frame.</p>
  <p>The return value is <strong>0</strong>,and it means <strong>success</strong> as the <a href="http://www.ffmpeg.org/doxygen/2.0/group__lavf__encoding.html#ga37352ed2c63493c38219d935e71db6c1" rel="nofollow noreferrer">description</a>.</p>
  <blockquote>
  <p>Write a packet to an output media file ensuring correct interleaving.</p>
  <p>The packet must contain one audio or video frame. If the packets are already correctly interleaved, the application should call av_write_frame() instead as it is slightly faster. It is also important to keep in mind that completely non-interleaved input will need huge amounts of memory to interleave with this, so it is preferable to interleave at the demuxer level.</p>
  <p>Parameters</p>
  <p><strong>s</strong>  media file handle</p>
  <p><strong>pkt</strong>    The packet containing the data to be written. pkt-&gt;buf must be set to a valid AVBufferRef describing the packet data. Libavformat takes ownership of this reference and will unref it when it sees fit. The caller must not access the data through this reference after this function returns. This can be NULL (at any time, not just at the end), to flush the interleaving queues. Packet's stream_index field must be set to the index of the corresponding stream in s.streams. It is very strongly recommended that timing information (pts, dts duration) is set to correct values.</p>
  <p>Returns</p>
  <p><strong>0</strong> on success, a negative AVERROR on error.</p>
  </blockquote>
  <p>However, I found no data written.</p>
  <p>What did i miss ? How to solve it ?</p>