@ -86,14 +86,8 @@
# include <conio.h>
# endif
# if HAVE_THREADS
# if HAVE_PTHREADS
# include <pthread.h>
# else
//#include "libavcodec/w32pthreads.h"
# undef HAVE_THREADS
# define HAVE_THREADS 0
# endif
# endif
# include <time.h>
@ -181,7 +175,7 @@ static int print_stats = 1;
static int debug_ts = 0 ;
static int current_time ;
# if HAVE_THREADS
# if HAVE_P THREADS
/* signal to input threads that they should exit; set by the main thread */
static int transcoding_finished ;
# endif
@ -271,7 +265,7 @@ typedef struct InputFile {
from ctx . nb_streams if new streams appear during av_read_frame ( ) */
int rate_emu ;
# if HAVE_THREADS
# if HAVE_P THREADS
pthread_t thread ; /* thread reading from this file */
int finished ; /* the thread has exited */
int joined ; /* the thread has been joined */
@ -3334,7 +3328,7 @@ static int check_keyboard_interaction(int64_t cur_time)
return 0 ;
}
# if HAVE_THREADS
# if HAVE_P THREADS
static void * input_thread ( void * arg )
{
InputFile * f = arg ;
@ -3446,7 +3440,7 @@ static int get_input_packet_mt(InputFile *f, AVPacket *pkt)
static int get_input_packet ( InputFile * f , AVPacket * pkt )
{
# if HAVE_THREADS
# if HAVE_P THREADS
if ( nb_input_files > 1 )
return get_input_packet_mt ( f , pkt ) ;
# endif
@ -3479,7 +3473,7 @@ static int transcode(void)
timer_start = av_gettime ( ) ;
# if HAVE_THREADS
# if HAVE_P THREADS
if ( ( ret = init_input_threads ( ) ) < 0 )
goto fail ;
# endif
@ -3629,7 +3623,7 @@ static int transcode(void)
/* dump report by using the output first video and audio streams */
print_report ( 0 , timer_start , cur_time ) ;
}
# if HAVE_THREADS
# if HAVE_P THREADS
free_input_threads ( ) ;
# endif
@ -3676,7 +3670,7 @@ static int transcode(void)
fail :
av_freep ( & no_packet ) ;
# if HAVE_THREADS
# if HAVE_P THREADS
free_input_threads ( ) ;
# endif