diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-13 19:38:53 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-13 19:38:53 +0100 |
commit | d1d18588d3bc91f72f6e9534d1f90b8aac7c118f (patch) | |
tree | 4e927ac2afac2d6f4cd45cfcdfe70992ba55008e | |
parent | 64a216c54142bde7188b690776c0a5decc0cef94 (diff) | |
download | xine-lib-d1d18588d3bc91f72f6e9534d1f90b8aac7c118f.tar.gz xine-lib-d1d18588d3bc91f72f6e9534d1f90b8aac7c118f.tar.bz2 |
Set stream information only when reading a streaminfo FLAC block.
(transplanted from 6d9f36be48839984c3888f3d803319942c4d76e6)
--HG--
extra : transplant_source : E%81r%E5-%5B%C2%21%15h%E3_%CB%23%25%9B%01l%03Y
-rw-r--r-- | src/demuxers/demux_ogg.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index 4eacf7070..9ed39f12d 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -1221,16 +1221,17 @@ static void decode_flac_header (demux_ogg_t *this, const int stream_num, ogg_pac case FLAC_BLOCKTYPE_STREAMINFO: _x_assert(header.length == FLAC_STREAMINFO_SIZE); _x_parse_flac_streaminfo_block(&op->packet[17], &streaminfo); + + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, streaminfo.samplerate); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, streaminfo.channels); + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, streaminfo.bits_per_sample); + break; } this->si[stream_num]->buf_types = BUF_AUDIO_FLAC +this->num_audio_streams++; - _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, streaminfo.samplerate); - _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, streaminfo.channels); - _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, streaminfo.bits_per_sample); - this->si[stream_num]->factor = 90000; buf = this->audio_fifo->buffer_pool_alloc(this->audio_fifo); |