title: Streaming OGG Flac to Icecast with libshout
body: <p>I have a simple streamer developed in C++ using LibFlac and LibShout to stream to Icecast server.
  The flac Encoder is created in the following way:</p>
  
  <pre><code>  m_encoder = FLAC__stream_encoder_new();
    FLAC__stream_encoder_set_channels(m_encoder, 2);
    FLAC__stream_encoder_set_ogg_serial_number(m_encoder, rand());
    FLAC__stream_encoder_set_bits_per_sample(m_encoder, 16);
    FLAC__stream_encoder_set_sample_rate(m_encoder, in_samplerate);
    FLAC__stream_encoder_init_ogg_stream(m_encoder, NULL, writeByteArray, NULL, NULL, NULL, this);
  </code></pre>
  
  <p>The function <code>writeByteArray</code> sends encoded data to Icecast using <code>shout_send_raw</code> function from libshout.
  <code>shout_send_raw</code> returns an actual number of bytes being sent, so I assume that it works as it should, no error is happening.
  The problem is Icecast server does not stream the data that I send. I see followint in the log:
  <code>
  [2018-02-15  15:31:47] DBUG stats/modify_node_event update "/radio" total_bytes_read (20735897)
  [2018-02-15  15:31:47] DBUG stats/modify_node_event update "/radio" total_bytes_sent (0)
  </code>
  I see that Icecast receives the data, but it does not send it to connected clients. The mount point is <code>radio</code> and when I try to connect to that mount using any media player - it does nothing, no playback.
  So my question is how is that possible that Icecast receives the data but does not send it to connected clients? 
  Maybe some additional libshout configuration is required, here is how I configure it:
  <code>
  shout_set_format( m_ShoutData, SHOUT_FORMAT_OGG_AUDIO );
  shout_set_mime( m_ShoutData, "application/ogg" );
  </code>
  Any help would be appreciated.</p>