---

As Anton suggested

 avconv.c  | 16 ++--------------
 avconv.h  |  4 ----
 configure |  2 +-
 3 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/avconv.c b/avconv.c
index 6b37d6e..25bc264 100644
--- a/avconv.c
+++ b/avconv.c
@@ -69,9 +69,7 @@
 #include <sys/select.h>
 #endif

-#if HAVE_PTHREADS
 #include <pthread.h>
-#endif

 #include <time.h>

@@ -89,10 +87,8 @@ static int nb_frames_drop = 0;



-#if HAVE_PTHREADS
 /* signal to input threads that they should exit; set by the main thread */
 static int transcoding_finished;
-#endif

 InputStream **input_streams = NULL;
 int        nb_input_streams = 0;
@@ -2136,7 +2132,6 @@ static InputFile *select_input_file(void)
     return ifile;
 }

-#if HAVE_PTHREADS
 static void *input_thread(void *arg)
 {
     InputFile *f = arg;
@@ -2243,7 +2238,6 @@ static int get_input_packet_mt(InputFile *f, AVPacket 
*pkt)

     return ret;
 }
-#endif

 static int get_input_packet(InputFile *f, AVPacket *pkt)
 {
@@ -2258,10 +2252,9 @@ static int get_input_packet(InputFile *f, AVPacket *pkt)
         }
     }

-#if HAVE_PTHREADS
     if (nb_input_files > 1)
         return get_input_packet_mt(f, pkt);
-#endif
+
     return av_read_frame(f->ctx, pkt);
 }

@@ -2536,10 +2529,8 @@ static int transcode(void)

     timer_start = av_gettime_relative();

-#if HAVE_PTHREADS
     if ((ret = init_input_threads()) < 0)
         goto fail;
-#endif

     while (!received_sigterm) {
         /* check if there's any stream where output is still needed */
@@ -2567,9 +2558,8 @@ static int transcode(void)
         /* dump report by using the output first video and audio streams */
         print_report(0, timer_start);
     }
-#if HAVE_PTHREADS
+
     free_input_threads();
-#endif

     /* at the end of stream, we must flush the decoder buffers */
     for (i = 0; i < nb_input_streams; i++) {
@@ -2614,9 +2604,7 @@ static int transcode(void)
     ret = 0;

  fail:
-#if HAVE_PTHREADS
     free_input_threads();
-#endif

     if (output_streams) {
         for (i = 0; i < nb_output_streams; i++) {
diff --git a/avconv.h b/avconv.h
index f0a948f..779960e 100644
--- a/avconv.h
+++ b/avconv.h
@@ -24,9 +24,7 @@
 #include <stdint.h>
 #include <stdio.h>

-#if HAVE_PTHREADS
 #include <pthread.h>
-#endif

 #include "cmdutils.h"

@@ -299,14 +297,12 @@ typedef struct InputFile {
     int rate_emu;
     int accurate_seek;

-#if HAVE_PTHREADS
     pthread_t thread;           /* thread reading from this file */
     int finished;               /* the thread has exited */
     int joined;                 /* the thread has been joined */
     pthread_mutex_t fifo_lock;  /* lock for access to fifo */
     pthread_cond_t  fifo_cond;  /* the main thread will signal on this cond 
after reading from fifo */
     AVFifoBuffer *fifo;         /* demuxed packets are stored here; freed by 
the main thread */
-#endif
 } InputFile;

 typedef struct OutputStream {
diff --git a/configure b/configure
index 23e4037..299da09 100755
--- a/configure
+++ b/configure
@@ -2364,7 +2364,7 @@ avresample_deps="avutil"
 swscale_deps="avutil"

 # programs
-avconv_deps="avcodec avfilter avformat avresample swscale"
+avconv_deps="avcodec avfilter avformat avresample swscale pthreads"
 avconv_select="aformat_filter anull_filter asyncts_filter atrim_filter 
format_filter
                fps_filter null_filter resample_filter scale_filter
                setpts_filter trim_filter"
--
2.6.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to