$OpenBSD: patch-src_demuxers_demux_flac_c,v 1.3 2010/03/03 08:29:18 sthen Exp $
--- src/demuxers/demux_flac.c.orig	Sat Jan 16 23:08:41 2010
+++ src/demuxers/demux_flac.c	Sat Jan 16 23:10:40 2010
@@ -352,6 +352,7 @@ static void demux_flac_send_headers(demux_plugin_t *th
   demux_flac_t *this = (demux_flac_t *) this_gen;
   buf_element_t *buf;
   xine_waveformatex wave;
+  int bits;
 
   this->audio_fifo  = this->stream->audio_fifo;
 
@@ -364,12 +365,15 @@ static void demux_flac_send_headers(demux_plugin_t *th
     return;
   }
 
+  /* lie about 24bps */
+  bits = this->bits_per_sample > 16 ? 16 : this->bits_per_sample;
+
   buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
   buf->type = BUF_AUDIO_FLAC;
   buf->decoder_flags = BUF_FLAG_HEADER|BUF_FLAG_STDHEADER|BUF_FLAG_FRAME_END;
   buf->decoder_info[0] = 0;
   buf->decoder_info[1] = this->sample_rate;
-  buf->decoder_info[2] = this->bits_per_sample;
+  buf->decoder_info[2] = bits;
   buf->decoder_info[3] = this->channels;
   /* copy the faux WAV header */
   buf->size = sizeof(xine_waveformatex) + FLAC_STREAMINFO_SIZE;
@@ -386,7 +390,7 @@ static void demux_flac_send_headers(demux_plugin_t *th
   _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
                        this->sample_rate);
   _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
-                       this->bits_per_sample);
+                       bits);
 
   this->status = DEMUX_OK;
 }
