Commit 5033ec09 authored by Sam Hocevar's avatar Sam Hocevar

. ajout des patches ac3 de MaXX dans le nouveau d�codeur

 . fix� ce #@!#@! de idct.c.new qui fait _chier_
parent 7295c009
......@@ -64,6 +64,7 @@
/* Audio */
#include "audio_output.h"
#include "audio_decoder.h"
#include "ac3_decoder.h"
/* Video */
#include "video.h"
......
......@@ -92,7 +92,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
/* Don't decode PSI streams ! */
if( p_input->p_es[i_es_loop].b_psi )
{
intf_ErrMsg("input_error: trying to decode PID %d which is the one of a PSI\n");
intf_ErrMsg("input_error: trying to decode PID %d which is the one of a PSI\n", i_current_id);
vlc_mutex_unlock( &p_input->es_lock );
return( -1 );
}
......@@ -139,7 +139,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
default:
/* That should never happen. */
intf_DbgMsg("input error: unknown stream type (%d)\n",
intf_DbgMsg("input error: unknown stream type (0x%.2x)\n",
p_input->p_es[i_es_loop].i_type);
vlc_mutex_unlock( &p_input->es_lock );
return( -1 );
......
......@@ -94,7 +94,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
/* Don't decode PSI streams ! */
if( p_input->p_es[i_es_loop].b_psi )
{
intf_ErrMsg("input_error: trying to decode PID %d which is the one of a PSI\n");
intf_ErrMsg("input_error: trying to decode PID %d which is the one of a PSI\n", i_current_id);
vlc_mutex_unlock( &p_input->es_lock );
return( -1 );
}
......@@ -103,6 +103,17 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
/* Spawn the decoder. */
switch( p_input->p_es[i_es_loop].i_type )
{
case AC3_AUDIO_ES:
/* Spawn ac3 thread */
if ( ((ac3dec_thread_t *)(p_input->p_es[i_es_loop].p_dec) =
ac3dec_CreateThread(p_input)) == NULL )
{
intf_ErrMsg( "Could not start ac3 decoder\n" );
vlc_mutex_unlock( &p_input->es_lock );
return( -1 );
}
break;
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
/* Spawn audio thread. */
......@@ -130,7 +141,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
default:
/* That should never happen. */
intf_DbgMsg("input error: unknown stream type (%d)\n",
intf_DbgMsg("input error: unknown stream type (0x%.2x)\n",
p_input->p_es[i_es_loop].i_type);
vlc_mutex_unlock( &p_input->es_lock );
return( -1 );
......@@ -196,6 +207,10 @@ int input_DelPgrmElem( input_thread_t *p_input, int i_current_id )
/* Cancel the decoder. */
switch( p_input->pp_selected_es[i_selected_es_loop]->i_type )
{
case AC3_AUDIO_ES:
ac3dec_DestroyThread( (ac3dec_thread_t *)(p_input->pp_selected_es[i_selected_es_loop]->p_dec) );
break;
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
adec_DestroyThread( (adec_thread_t*)(p_input->pp_selected_es[i_selected_es_loop]->p_dec) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment