From 09bd533cd8f40a94af51d6a4703583e2c863f359 Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Sat, 17 May 2003 18:18:52 +0000 Subject: add bitrate meta info and display codec info when playing dvds with lpcm CVS patchset: 4869 CVS date: 2003/05/17 18:18:52 --- src/liblpcm/xine_decoder.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/liblpcm/xine_decoder.c b/src/liblpcm/xine_decoder.c index 6ea58e28c..12546e70c 100644 --- a/src/liblpcm/xine_decoder.c +++ b/src/liblpcm/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.40 2003/01/08 01:02:29 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.41 2003/05/17 18:18:52 jstembridge Exp $ * * 31-8-2001 Added LPCM rate sensing. * (c) 2001 James Courtier-Dutton James@superbug.demon.co.uk @@ -109,9 +109,6 @@ void lpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { this->bits_per_sample=buf->decoder_info[2] ; this->number_of_channels=buf->decoder_info[3] ; format_changed++; - - /* stream/meta info */ - this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("Linear PCM"); } /* @@ -127,6 +124,11 @@ void lpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { (this->bits_per_sample>16)?16:this->bits_per_sample, this->rate, this->ao_cap_mode) ; + + /* stream/meta info */ + this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("Linear PCM"); + this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE] = + this->bits_per_sample * this->rate * this->number_of_channels; } if (!this->output_open || (buf->decoder_flags & BUF_FLAG_HEADER) ) -- cgit v1.2.3