<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    I'm using the AVCodec API as a basis for encoding audio. I managed
    to successfully create a WAV file. When I encode a FLAC file the
    encoding succeeds, but when I open the file, the sound plays, but no
    media player can detect the length of the FLAC file. When I use the
    ffmpeg command line tool, I get the following info on the file:<br>
    <br>
    <blockquote><i>[flac @ 0x94e8380] max_analyze_duration 5000000
        reached at 5015510</i><br>
      <i>[flac @ 0x94e8380] Estimating duration from bitrate, this may
        be inaccurate</i><br>
      <i>Input #0, flac, from '00001.flac':</i><br>
      <i>  Metadata:</i><br>
      <i>    ENCODER         : Lavf54.3.100</i><br>
      <i>  Duration: N/A, bitrate: N/A</i><br>
      <i>    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16</i><br>
    </blockquote>
    So here it also seems that the duration cannot be retrieved.<br>
    <br>
    I'm writing all headers and trailers ( <i>avformat_write_header(formatContext,
      NULL)</i>    and   <i> av_write_trailer(formatContext)</i> ).<br>
    Does anyone know what I might be missing?<br>
    <br>
    Chris<br>
  </body>
</html>