diff options
Diffstat (limited to 'src/demuxers/demux_mpeg_block.c')
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 1f9144505..9507e287a 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.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: demux_mpeg_block.c,v 1.108 2002/07/17 18:17:48 miguelfreitas Exp $ + * $Id: demux_mpeg_block.c,v 1.109 2002/07/19 03:03:36 miguelfreitas Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -91,11 +91,6 @@ typedef struct demux_mpeg_block_s { int send_newpts; int buf_flag_seek; - - int pcm_bits; - int pcm_rate; - int pcm_channels; - } demux_mpeg_block_t ; @@ -255,7 +250,9 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m p = buf->content; /* len = this->mnBlocksize; */ if (preview_mode) buf->decoder_flags = BUF_FLAG_PREVIEW; - + else + buf->decoder_flags = 0; + buf->input_pos = this->input->get_current_pos (this->input); buf->input_length = this->input->get_length (this->input); @@ -588,26 +585,11 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m } dynamic_range = p[6]; - /* send header with audio parameters */ - if( !preview_mode && - (this->pcm_rate != sample_rate || - this->pcm_bits != bits_per_sample || - this->pcm_channels != num_channels) ) { - - buf_element_t *buf2; - - buf2 = this->video_fifo->buffer_pool_alloc (this->video_fifo); - - buf2->type = BUF_AUDIO_LPCM_BE + track; - buf2->decoder_flags = BUF_FLAG_HEADER; - - buf2->decoder_info[1] = this->pcm_rate = sample_rate; - buf2->decoder_info[2] = this->pcm_bits = bits_per_sample; - buf2->decoder_info[3] = this->pcm_channels = num_channels; - - this->video_fifo->put(this->video_fifo, buf2); - } - + /* send lpcm config byte */ + buf->decoder_flags |= BUF_FLAG_SPECIAL; + buf->decoder_info[1] = BUF_SPECIAL_LPCM_CONFIG; + buf->decoder_info[2] = p[5]; + pcm_offset = 7; buf->content = p+pcm_offset; @@ -934,8 +916,6 @@ static int demux_mpeg_block_start (demux_plugin_t *this_gen, this->video_fifo = video_fifo; this->audio_fifo = audio_fifo; - this->pcm_bits = this->pcm_rate = this->pcm_channels = 0; - if((this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE) != 0) { if (!this->blocksize) this->blocksize = demux_mpeg_detect_blocksize( this, this->input ); |