mirror of https://git.ffmpeg.org/ffmpeg.git
use if(ENABLE_SWSCALER) instead of #ifdef CONFIG_SWSCALER
Originally committed as revision 9160 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
b1b64c237f
commit
8623e55867
13
ffmpeg.c
13
ffmpeg.c
|
@ -1610,9 +1610,8 @@ static int av_encode(AVFormatContext **output_files,
|
||||||
fprintf(stderr, "Cannot allocate temp picture, check pix fmt\n");
|
fprintf(stderr, "Cannot allocate temp picture, check pix fmt\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_SWSCALER
|
if (ENABLE_SWSCALER)
|
||||||
sws_flags = av_get_int(sws_opts, "sws_flags", NULL);
|
sws_flags = av_get_int(sws_opts, "sws_flags", NULL);
|
||||||
#endif
|
|
||||||
ost->img_resample_ctx = sws_getContext(
|
ost->img_resample_ctx = sws_getContext(
|
||||||
icodec->width - (frame_leftBand + frame_rightBand),
|
icodec->width - (frame_leftBand + frame_rightBand),
|
||||||
icodec->height - (frame_topBand + frame_bottomBand),
|
icodec->height - (frame_topBand + frame_bottomBand),
|
||||||
|
@ -3521,10 +3520,8 @@ static int opt_default(const char *opt, const char *arg){
|
||||||
}
|
}
|
||||||
if(!o)
|
if(!o)
|
||||||
o = av_set_string(avformat_opts, opt, arg);
|
o = av_set_string(avformat_opts, opt, arg);
|
||||||
#ifdef CONFIG_SWSCALER
|
if(ENABLE_SWSCALER && !o)
|
||||||
if(!o)
|
|
||||||
o = av_set_string(sws_opts, opt, arg);
|
o = av_set_string(sws_opts, opt, arg);
|
||||||
#endif
|
|
||||||
if(!o){
|
if(!o){
|
||||||
if(opt[0] == 'a')
|
if(opt[0] == 'a')
|
||||||
o = av_set_string(avctx_opts[CODEC_TYPE_AUDIO], opt+1, arg);
|
o = av_set_string(avctx_opts[CODEC_TYPE_AUDIO], opt+1, arg);
|
||||||
|
@ -3767,9 +3764,8 @@ static void show_help(void)
|
||||||
OPT_EXPERT);
|
OPT_EXPERT);
|
||||||
av_opt_show(avctx_opts[0], NULL);
|
av_opt_show(avctx_opts[0], NULL);
|
||||||
av_opt_show(avformat_opts, NULL);
|
av_opt_show(avformat_opts, NULL);
|
||||||
#ifdef CONFIG_SWSCALER
|
if (ENABLE_SWSCALER)
|
||||||
av_opt_show(sws_opts, NULL);
|
av_opt_show(sws_opts, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -3790,9 +3786,8 @@ int main(int argc, char **argv)
|
||||||
avctx_opts[i]= avcodec_alloc_context2(i);
|
avctx_opts[i]= avcodec_alloc_context2(i);
|
||||||
}
|
}
|
||||||
avformat_opts = av_alloc_format_context();
|
avformat_opts = av_alloc_format_context();
|
||||||
#ifdef CONFIG_SWSCALER
|
if (ENABLE_SWSCALER)
|
||||||
sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, sws_flags, NULL,NULL,NULL);
|
sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, sws_flags, NULL,NULL,NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (argc <= 1)
|
if (argc <= 1)
|
||||||
show_help();
|
show_help();
|
||||||
|
|
Loading…
Reference in New Issue