ce qui devrait au minimum compenser la perte due a ma derniere modification.
# Video output settings
VIDEO = x11
-VIDEO += fb
+#VIDEO += fb
#VIDEO += ggi
#VIDEO += glide
# Not yet supported
*/
/* Current TS packet (in the current PES packet of the PES stream) */
ts_packet_t * p_ts;
- /* Index of the next byte that is to be read (in the current TS packet) */
- unsigned int i_byte;
+ /* Pointer to the next byte that is to be read (in the current TS packet) */
+ byte_t * p_byte;
+ /* Pointer to the last byte that is to be read (in the current TS packet */
+ byte_t * p_end;
/*
* Bit structures
static __inline__ byte_t GetByte( bit_stream_t * p_bit_stream )
{
/* Are there some bytes left in the current TS packet ? */
- if ( p_bit_stream->i_byte >= p_bit_stream->p_ts->i_payload_end )
+ /* could change this test to have a if (! (bytes--)) instead */
+ if ( p_bit_stream->p_byte >= p_bit_stream->p_end )
{
/* no, switch to next TS packet */
decoder_fifo_next( p_bit_stream );
}
- return( p_bit_stream->p_ts->buffer[ p_bit_stream->i_byte++ ] );
+ return( *(p_bit_stream->p_byte++));
}
/*****************************************************************************
vlc_cond_wait( &p_ac3dec->fifo.data_wait, &p_ac3dec->fifo.data_lock );
}
p_ac3dec->bit_stream.p_ts = DECODER_FIFO_START( p_ac3dec->fifo )->p_first_ts;
- p_ac3dec->bit_stream.i_byte = p_ac3dec->bit_stream.p_ts->i_payload_start;
+ p_ac3dec->bit_stream.p_byte = p_ac3dec->bit_stream.p_ts->buffer + p_ac3dec->bit_stream.p_ts->i_payload_start;
+ p_ac3dec->bit_stream.p_end = p_ac3dec->bit_stream.p_ts->buffer + p_ac3dec->bit_stream.p_ts->i_payload_end;
vlc_mutex_unlock( &p_ac3dec->fifo.data_lock );
aout_fifo.i_type = AOUT_ADEC_STEREO_FIFO;
vlc_cond_wait( &p_adec->fifo.data_wait, &p_adec->fifo.data_lock );
}
p_adec->bit_stream.p_ts = DECODER_FIFO_START( p_adec->fifo )->p_first_ts;
- p_adec->bit_stream.i_byte = p_adec->bit_stream.p_ts->i_payload_start;
+ p_adec->bit_stream.p_byte = p_adec->bit_stream.p_ts->buffer + p_adec->bit_stream.p_ts->i_payload_start;
+ p_adec->bit_stream.p_end = p_adec->bit_stream.p_ts->buffer + p_adec->bit_stream.p_ts->i_payload_end;
vlc_mutex_unlock( &p_adec->fifo.data_lock );
/* Now we look for an audio frame header in the input stream */
} while ( p_bit_stream->p_ts->i_payload_start == p_bit_stream->p_ts->i_payload_end );
/* We've found a TS packet which contains interesting data... */
- p_bit_stream->i_byte = p_bit_stream->p_ts->i_payload_start;
+ p_bit_stream->p_byte = p_bit_stream->p_ts->buffer + p_bit_stream->p_ts->i_payload_start;
+ p_bit_stream->p_end = p_bit_stream->p_ts->buffer + p_bit_stream->p_ts->i_payload_end;
}
}
p_spudec->bit_stream.p_ts = DECODER_FIFO_START( p_spudec->fifo )->p_first_ts;
- p_spudec->bit_stream.i_byte = p_spudec->bit_stream.p_ts->i_payload_start;
+ p_spudec->bit_stream.p_byte = p_spudec->bit_stream.p_ts->buffer + p_spudec->bit_stream.p_ts->i_payload_start;
+ p_spudec->bit_stream.p_end = p_spudec->bit_stream.p_ts->buffer + p_spudec->bit_stream.p_ts->i_payload_end;
vlc_mutex_unlock( &p_spudec->fifo.data_lock );
/* Mark thread as running and return */
vlc_cond_wait( &p_vpar->fifo.data_wait, &p_vpar->fifo.data_lock );
}
p_vpar->bit_stream.p_ts = DECODER_FIFO_START( p_vpar->fifo )->p_first_ts;
- p_vpar->bit_stream.i_byte = p_vpar->bit_stream.p_ts->i_payload_start;
+ p_vpar->bit_stream.p_byte = p_vpar->bit_stream.p_ts->buffer + p_vpar->bit_stream.p_ts->i_payload_start;
+ p_vpar->bit_stream.p_end = p_vpar->bit_stream.p_ts->buffer + p_vpar->bit_stream.p_ts->i_payload_end;
vlc_mutex_unlock( &p_vpar->fifo.data_lock );
/* Initialize parsing data */