| 
																	
																	
																		
																	
																	
																 | 
																@@ -61,6 +61,7 @@ | 
															
														
														
													
														
															
																 | 
																 | 
																#include "libavutil/timestamp.h" | 
																 | 
																 | 
																#include "libavutil/timestamp.h" | 
															
														
														
													
														
															
																 | 
																 | 
																#include "libavutil/bprint.h" | 
																 | 
																 | 
																#include "libavutil/bprint.h" | 
															
														
														
													
														
															
																 | 
																 | 
																#include "libavutil/time.h" | 
																 | 
																 | 
																#include "libavutil/time.h" | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																#include "libavutil/thread.h" | 
															
														
														
													
														
															
																 | 
																 | 
																#include "libavutil/threadmessage.h" | 
																 | 
																 | 
																#include "libavutil/threadmessage.h" | 
															
														
														
													
														
															
																 | 
																 | 
																#include "libavcodec/mathops.h" | 
																 | 
																 | 
																#include "libavcodec/mathops.h" | 
															
														
														
													
														
															
																 | 
																 | 
																#include "libavformat/os_support.h" | 
																 | 
																 | 
																#include "libavformat/os_support.h" | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -98,10 +99,6 @@ | 
															
														
														
													
														
															
																 | 
																 | 
																#include <conio.h> | 
																 | 
																 | 
																#include <conio.h> | 
															
														
														
													
														
															
																 | 
																 | 
																#endif | 
																 | 
																 | 
																#endif | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																#if HAVE_PTHREADS | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																#include <pthread.h> | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																#endif | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																#include <time.h> | 
																 | 
																 | 
																#include <time.h> | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																#include "ffmpeg.h" | 
																 | 
																 | 
																#include "ffmpeg.h" | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -161,7 +158,7 @@ static struct termios oldtty; | 
															
														
														
													
														
															
																 | 
																 | 
																static int restore_tty; | 
																 | 
																 | 
																static int restore_tty; | 
															
														
														
													
														
															
																 | 
																 | 
																#endif | 
																 | 
																 | 
																#endif | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																#if HAVE_PTHREADS | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																#if HAVE_THREADS | 
															
														
														
													
														
															
																 | 
																 | 
																static void free_input_threads(void); | 
																 | 
																 | 
																static void free_input_threads(void); | 
															
														
														
													
														
															
																 | 
																 | 
																#endif | 
																 | 
																 | 
																#endif | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -578,7 +575,7 @@ static void ffmpeg_cleanup(int ret) | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																        av_freep(&output_streams[i]); | 
																 | 
																 | 
																        av_freep(&output_streams[i]); | 
															
														
														
													
														
															
																 | 
																 | 
																    } | 
																 | 
																 | 
																    } | 
															
														
														
													
														
															
																 | 
																 | 
																#if HAVE_PTHREADS | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																#if HAVE_THREADS | 
															
														
														
													
														
															
																 | 
																 | 
																    free_input_threads(); | 
																 | 
																 | 
																    free_input_threads(); | 
															
														
														
													
														
															
																 | 
																 | 
																#endif | 
																 | 
																 | 
																#endif | 
															
														
														
													
														
															
																 | 
																 | 
																    for (i = 0; i < nb_input_files; i++) { | 
																 | 
																 | 
																    for (i = 0; i < nb_input_files; i++) { | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -3996,7 +3993,7 @@ static int check_keyboard_interaction(int64_t cur_time) | 
															
														
														
													
														
															
																 | 
																 | 
																    return 0; | 
																 | 
																 | 
																    return 0; | 
															
														
														
													
														
															
																 | 
																 | 
																} | 
																 | 
																 | 
																} | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																#if HAVE_PTHREADS | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																#if HAVE_THREADS | 
															
														
														
													
														
															
																 | 
																 | 
																static void *input_thread(void *arg) | 
																 | 
																 | 
																static void *input_thread(void *arg) | 
															
														
														
													
														
															
																 | 
																 | 
																{ | 
																 | 
																 | 
																{ | 
															
														
														
													
														
															
																 | 
																 | 
																    InputFile *f = arg; | 
																 | 
																 | 
																    InputFile *f = arg; | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -4106,7 +4103,7 @@ static int get_input_packet(InputFile *f, AVPacket *pkt) | 
															
														
														
													
														
															
																 | 
																 | 
																        } | 
																 | 
																 | 
																        } | 
															
														
														
													
														
															
																 | 
																 | 
																    } | 
																 | 
																 | 
																    } | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																#if HAVE_PTHREADS | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																#if HAVE_THREADS | 
															
														
														
													
														
															
																 | 
																 | 
																    if (nb_input_files > 1) | 
																 | 
																 | 
																    if (nb_input_files > 1) | 
															
														
														
													
														
															
																 | 
																 | 
																        return get_input_packet_mt(f, pkt); | 
																 | 
																 | 
																        return get_input_packet_mt(f, pkt); | 
															
														
														
													
														
															
																 | 
																 | 
																#endif | 
																 | 
																 | 
																#endif | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -4615,7 +4612,7 @@ static int transcode(void) | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																    timer_start = av_gettime_relative(); | 
																 | 
																 | 
																    timer_start = av_gettime_relative(); | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																#if HAVE_PTHREADS | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																#if HAVE_THREADS | 
															
														
														
													
														
															
																 | 
																 | 
																    if ((ret = init_input_threads()) < 0) | 
																 | 
																 | 
																    if ((ret = init_input_threads()) < 0) | 
															
														
														
													
														
															
																 | 
																 | 
																        goto fail; | 
																 | 
																 | 
																        goto fail; | 
															
														
														
													
														
															
																 | 
																 | 
																#endif | 
																 | 
																 | 
																#endif | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -4646,7 +4643,7 @@ static int transcode(void) | 
															
														
														
													
														
															
																 | 
																 | 
																        /* dump report by using the output first video and audio streams */ | 
																 | 
																 | 
																        /* dump report by using the output first video and audio streams */ | 
															
														
														
													
														
															
																 | 
																 | 
																        print_report(0, timer_start, cur_time); | 
																 | 
																 | 
																        print_report(0, timer_start, cur_time); | 
															
														
														
													
														
															
																 | 
																 | 
																    } | 
																 | 
																 | 
																    } | 
															
														
														
													
														
															
																 | 
																 | 
																#if HAVE_PTHREADS | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																#if HAVE_THREADS | 
															
														
														
													
														
															
																 | 
																 | 
																    free_input_threads(); | 
																 | 
																 | 
																    free_input_threads(); | 
															
														
														
													
														
															
																 | 
																 | 
																#endif | 
																 | 
																 | 
																#endif | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -4712,7 +4709,7 @@ static int transcode(void) | 
															
														
														
													
														
															
																 | 
																 | 
																    ret = 0; | 
																 | 
																 | 
																    ret = 0; | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																 fail: | 
																 | 
																 | 
																 fail: | 
															
														
														
													
														
															
																 | 
																 | 
																#if HAVE_PTHREADS | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																#if HAVE_THREADS | 
															
														
														
													
														
															
																 | 
																 | 
																    free_input_threads(); | 
																 | 
																 | 
																    free_input_threads(); | 
															
														
														
													
														
															
																 | 
																 | 
																#endif | 
																 | 
																 | 
																#endif | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																	
																 | 
																
  |