+Tue, 22 Aug 2000 01:31:58 +0200
0.1.99h :
* fixed the sound issue under beos
* fixed a Makefile bug which removed the CVS directory.
* removed the frame statistics output.
* removed a verbose message in intf_sdl.c.
+ * added a few sanity checks in the audio mpeg and ac3 decoders.
+ * temporarily got rid of vlc.channels.
+ * added notice in debian/control about unencrypted DVDs.
+ * fixed PowerPC .deb build.
-Wed Aug 16 01:07:14 CEST 2000
+Wed, 16 Aug 2000 01:07:14 +0200
0.1.99g :
* removed all "*vlc" aliases except "gvlc" and "fbvlc". The other sucked.
* added request for ALSA support in the TODO list.
* changed "pentiumpro" to "ppro" in the ./configure, it was misleading.
-Tue Aug 8 11:24:01 CEST 2000
+Tue, 8 Aug 2000 11:24:01 +0200
0.1.99f :
* plugin detection now works
* borrowed linuxvideo's MMX motion compensation
* fixed an undefined symbol in the MMX YUV plugin
-Thu Jul 20 15:14:06 CEST 2000
+Thu, 20 Jul 2000 15:14:06 +0200
0.1.99e :
* new bitstream syntax and slight performance increase
* BeOS build fix
* removed the sample code from the reference decoder
-Wed Jul 12 01:24:40 CEST 2000
+Wed, 12 Jul 2000 01:24:40 +0200
0.1.99d :
* fixed RPM build
* fixed an endianness problem which occured on iMacs
* fixed the build for the Mandrake distribution
-Sun Jun 18 18:54:48 CEST 2000
+Sun, 18 Jun 2000 18:54:48 +0200
0.1.99c :
* fixed Makefile.in for debug version
* fixed a warning in ac3_exponent.c
* automatic support for .rpm and .deb building
-Sat Jun 17 03:35:02 CEST 2000
+Sat, 17 Jun 2000 03:35:02 +0200
0.1.99b :
* fixed a bug preventing to quit when run with no arguments
* new VLAN changing code
* created the ChangeLog file :)
-Thu Jun 15 20:48:54 CEST 2000
+Thu, 15 Jun 2000 20:48:54 +0200
0.1.99a :
* first public release
intf_DbgMsg( "ac3dec debug: creating ac3 decoder thread\n" );
/* Allocate the memory needed to store the thread's structure */
- if ((p_ac3dec = (ac3dec_thread_t *)malloc (sizeof(ac3dec_thread_t))) == NULL) {
+ if ((p_ac3dec = (ac3dec_thread_t *)malloc (sizeof(ac3dec_thread_t))) == NULL)
+ {
intf_ErrMsg ( "ac3dec error: not enough memory "
"for ac3dec_CreateThread() to create the new thread\n");
return NULL;
p_ac3dec->p_aout_fifo = NULL;
/* Spawn the ac3 decoder thread */
- if (vlc_thread_create(&p_ac3dec->thread_id, "ac3 decoder", (vlc_thread_func_t)RunThread, (void *)p_ac3dec)) {
+ if (vlc_thread_create(&p_ac3dec->thread_id, "ac3 decoder", (vlc_thread_func_t)RunThread, (void *)p_ac3dec))
+ {
intf_ErrMsg( "ac3dec error: can't spawn ac3 decoder thread\n" );
free (p_ac3dec);
return NULL;
/* Our first job is to initialize the bit stream structure with the
* beginning of the input stream */
vlc_mutex_lock (&p_ac3dec->fifo.data_lock);
- while (DECODER_FIFO_ISEMPTY(p_ac3dec->fifo)) {
- if (p_ac3dec->b_die) {
+ while (DECODER_FIFO_ISEMPTY(p_ac3dec->fifo))
+ {
+ if (p_ac3dec->b_die)
+ {
vlc_mutex_unlock (&p_ac3dec->fifo.data_lock);
return -1;
}
aout_fifo.l_frame_size = AC3DEC_FRAME_SIZE;
/* Creating the audio output fifo */
- if ((p_ac3dec->p_aout_fifo = aout_CreateFifo(p_ac3dec->p_aout, &aout_fifo)) == NULL) {
+ if ((p_ac3dec->p_aout_fifo = aout_CreateFifo(p_ac3dec->p_aout, &aout_fifo)) == NULL)
+ {
return -1;
}
msleep (INPUT_PTS_DELAY);
/* Initializing the ac3 decoder thread */
- if (InitThread (p_ac3dec)) /* XXX?? */ {
+ if (InitThread (p_ac3dec)) /* XXX?? */
+ {
p_ac3dec->b_error = 1;
}
/* ac3 decoder thread's main loop */
/* FIXME : do we have enough room to store the decoded frames ?? */
- while ((!p_ac3dec->b_die) && (!p_ac3dec->b_error)) {
+ while ((!p_ac3dec->b_die) && (!p_ac3dec->b_error))
+ {
s16 * buffer;
ac3_sync_info_t sync_info;
p_byte_stream = ac3_byte_stream (&p_ac3dec->ac3_decoder);
/* first read till next ac3 magic header */
- do {
+ do
+ {
ac3_byte_stream_next (p_byte_stream);
} while ((!p_ac3dec->sync_ptr) &&
(!p_ac3dec->b_die) &&
(!p_ac3dec->b_error));
/* skip the specified number of bytes */
+ if( p_ac3dec->b_die || p_ac3dec->b_error )
+ {
+ goto bad_frame;
+ }
+
ptr = p_ac3dec->sync_ptr;
- while (--ptr && (!p_ac3dec->b_die) && (!p_ac3dec->b_error)) {
- if (p_byte_stream->p_byte >= p_byte_stream->p_end) {
+ while (--ptr && (!p_ac3dec->b_die) && (!p_ac3dec->b_error))
+ {
+ if (p_byte_stream->p_byte >= p_byte_stream->p_end)
+ {
ac3_byte_stream_next (p_byte_stream);
}
p_byte_stream->p_byte++;
}
- /* we are in sync now */
+ if( p_ac3dec->b_die || p_ac3dec->b_error )
+ {
+ goto bad_frame;
+ }
+ /* we are in sync now */
sync = 1;
p_ac3dec->sync_ptr = 0;
}
- if (DECODER_FIFO_START(p_ac3dec->fifo)->b_has_pts) {
+ if (DECODER_FIFO_START(p_ac3dec->fifo)->b_has_pts)
+ {
p_ac3dec->p_aout_fifo->date[p_ac3dec->p_aout_fifo->l_end_frame] = DECODER_FIFO_START(p_ac3dec->fifo)->i_pts;
DECODER_FIFO_START(p_ac3dec->fifo)->b_has_pts = 0;
- } else {
+ }
+ else
+ {
p_ac3dec->p_aout_fifo->date[p_ac3dec->p_aout_fifo->l_end_frame] = LAST_MDATE;
}
- if (ac3_sync_frame (&p_ac3dec->ac3_decoder, &sync_info)) {
+ if (ac3_sync_frame (&p_ac3dec->ac3_decoder, &sync_info))
+ {
sync = 0;
goto bad_frame;
}
buffer = ((s16 *)p_ac3dec->p_aout_fifo->buffer) + (p_ac3dec->p_aout_fifo->l_end_frame * AC3DEC_FRAME_SIZE);
- if (ac3_decode_frame (&p_ac3dec->ac3_decoder, buffer)) {
+ if (ac3_decode_frame (&p_ac3dec->ac3_decoder, buffer))
+ {
sync = 0;
goto bad_frame;
}
}
/* If b_error is set, the ac3 decoder thread enters the error loop */
- if (p_ac3dec->b_error) {
+ if (p_ac3dec->b_error)
+ {
ErrorThread (p_ac3dec);
}
vlc_mutex_lock (&p_ac3dec->fifo.data_lock);
/* Wait until a `die' order is sent */
- while (!p_ac3dec->b_die) {
+ while (!p_ac3dec->b_die)
+ {
/* Trash all received PES packets */
- while (!DECODER_FIFO_ISEMPTY(p_ac3dec->fifo)) {
+ while (!DECODER_FIFO_ISEMPTY(p_ac3dec->fifo))
+ {
input_NetlistFreePES (p_ac3dec->p_input, DECODER_FIFO_START(p_ac3dec->fifo));
DECODER_FIFO_INCSTART (p_ac3dec->fifo);
}
intf_DbgMsg ("ac3dec debug: destroying ac3 decoder thread %p\n", p_ac3dec);
/* If the audio output fifo was created, we destroy it */
- if (p_ac3dec->p_aout_fifo != NULL) {
+ if (p_ac3dec->p_aout_fifo != NULL)
+ {
aout_DestroyFifo (p_ac3dec->p_aout_fifo);
/* Make sure the output thread leaves the NextFrame() function */
/* We are looking for the next TS packet that contains real data,
* and not just a PES header */
- do {
+ do
+ {
/* We were reading the last TS packet of this PES packet... It's
* time to jump to the next PES packet */
- if (p_ac3dec->p_ts->p_next_ts == NULL) {
+ if (p_ac3dec->p_ts->p_next_ts == NULL)
+ {
int ptr;
/* We are going to read/write the start and end indexes of the
vlc_mutex_lock (&p_ac3dec->fifo.data_lock);
/* Is the input thread dying ? */
- if (p_ac3dec->p_input->b_die) {
+ if (p_ac3dec->p_input->b_die)
+ {
vlc_mutex_unlock (&(p_ac3dec->fifo.data_lock));
return;
}
DECODER_FIFO_INCSTART (p_ac3dec->fifo);
- while (DECODER_FIFO_ISEMPTY(p_ac3dec->fifo)) {
+ while (DECODER_FIFO_ISEMPTY(p_ac3dec->fifo))
+ {
vlc_cond_wait (&p_ac3dec->fifo.data_wait, &p_ac3dec->fifo.data_lock);
- if (p_ac3dec->p_input->b_die) {
+ if (p_ac3dec->p_input->b_die)
+ {
vlc_mutex_unlock (&(p_ac3dec->fifo.data_lock));
return;
}
/* We can release the fifo's data lock */
vlc_mutex_unlock (&p_ac3dec->fifo.data_lock);
}
-
/* Perhaps the next TS packet of the current PES packet contains
* real data (ie its payload's size is greater than 0) */
- else {
+ else
+ {
p_ac3dec->p_ts = p_ac3dec->p_ts->p_next_ts;
}
} while (p_ac3dec->p_ts->i_payload_start == p_ac3dec->p_ts->i_payload_end);