| OLD | NEW |
| (Empty) | |
| 1 diff -wurp -N orig/cmdutils.c ffmpeg-mt/cmdutils.c |
| 2 --- orig/cmdutils.c 2010-11-04 08:11:38 -0700 |
| 3 +++ ffmpeg-mt/cmdutils.c 2010-11-04 08:11:46 -0700 |
| 4 @@ -32,7 +32,9 @@ |
| 5 #include "libavformat/avformat.h" |
| 6 #include "libavfilter/avfilter.h" |
| 7 #include "libavdevice/avdevice.h" |
| 8 +#if CONFIG_SWSCALE |
| 9 #include "libswscale/swscale.h" |
| 10 +#endif |
| 11 #include "libpostproc/postprocess.h" |
| 12 #include "libavutil/avstring.h" |
| 13 #include "libavutil/pixdesc.h" |
| 14 @@ -53,7 +55,9 @@ const char **opt_values; |
| 15 static int opt_name_count; |
| 16 AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; |
| 17 AVFormatContext *avformat_opts; |
| 18 +#if CONFIG_SWSCALE |
| 19 struct SwsContext *sws_opts; |
| 20 +#endif |
| 21 |
| 22 const int this_year = 2010; |
| 23 |
| 24 @@ -63,7 +67,9 @@ void init_opts(void) |
| 25 for (i = 0; i < AVMEDIA_TYPE_NB; i++) |
| 26 avcodec_opts[i] = avcodec_alloc_context2(i); |
| 27 avformat_opts = avformat_alloc_context(); |
| 28 +#if CONFIG_SWSCALE |
| 29 sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, NULL, NULL, NU
LL); |
| 30 +#endif |
| 31 } |
| 32 |
| 33 void uninit_opts(void) |
| 34 @@ -73,7 +79,9 @@ void uninit_opts(void) |
| 35 av_freep(&avcodec_opts[i]); |
| 36 av_freep(&avformat_opts->key); |
| 37 av_freep(&avformat_opts); |
| 38 +#if CONFIG_SWSCALE |
| 39 av_freep(&sws_opts); |
| 40 +#endif |
| 41 } |
| 42 |
| 43 void log_callback_help(void* ptr, int level, const char* fmt, va_list vl) |
| 44 @@ -225,8 +233,10 @@ int opt_default(const char *opt, const c |
| 45 } |
| 46 if(!o && avformat_opts) |
| 47 ret = av_set_string3(avformat_opts, opt, arg, 1, &o); |
| 48 +#if CONFIG_SWSCALE |
| 49 if(!o && sws_opts) |
| 50 ret = av_set_string3(sws_opts, opt, arg, 1, &o); |
| 51 +#endif |
| 52 if(!o){ |
| 53 if(opt[0] == 'a') |
| 54 ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg,
1, &o); |
| 55 @@ -390,7 +400,9 @@ static void print_all_libs_info(FILE* ou |
| 56 PRINT_LIB_INFO(outstream, avformat, AVFORMAT, flags); |
| 57 PRINT_LIB_INFO(outstream, avdevice, AVDEVICE, flags); |
| 58 PRINT_LIB_INFO(outstream, avfilter, AVFILTER, flags); |
| 59 +#if CONFIG_SWSCALE |
| 60 PRINT_LIB_INFO(outstream, swscale, SWSCALE, flags); |
| 61 +#endif |
| 62 PRINT_LIB_INFO(outstream, postproc, POSTPROC, flags); |
| 63 } |
| 64 |
| OLD | NEW |