Revision 35926489 ffmpeg.c

View differences:

ffmpeg.c
208 208
int opt_name_count=0;
209 209
AVCodecContext *avctx_opts[CODEC_TYPE_NB];
210 210
AVFormatContext *avformat_opts;
211
struct SwsContext *sws_opts;
211 212
static int64_t timer_start = 0;
212 213

  
213 214
static AVBitStreamFilterContext *video_bitstream_filters=NULL;
......
1609 1610
                        fprintf(stderr, "Cannot allocate temp picture, check pix fmt\n");
1610 1611
                        exit(1);
1611 1612
                    }
1613
#ifdef CONFIG_SWSCALER
1614
                    sws_flags = av_get_int(sws_opts, "sws_flags", NULL);
1615
#endif
1612 1616
                    ost->img_resample_ctx = sws_getContext(
1613 1617
                            icodec->width - (frame_leftBand + frame_rightBand),
1614 1618
                            icodec->height - (frame_topBand + frame_bottomBand),
......
3517 3521
    }
3518 3522
    if(!o)
3519 3523
        o = av_set_string(avformat_opts, opt, arg);
3524
#ifdef CONFIG_SWSCALER
3525
    if(!o)
3526
        o = av_set_string(sws_opts, opt, arg);
3527
#endif
3520 3528
    if(!o){
3521 3529
        if(opt[0] == 'a')
3522 3530
            o = av_set_string(avctx_opts[CODEC_TYPE_AUDIO], opt+1, arg);
......
3759 3767
                      OPT_EXPERT);
3760 3768
    av_opt_show(avctx_opts[0], NULL);
3761 3769
    av_opt_show(avformat_opts, NULL);
3770
#ifdef CONFIG_SWSCALER
3771
    av_opt_show(sws_opts, NULL);
3772
#endif
3762 3773

  
3763 3774
    exit(1);
3764 3775
}
......
3779 3790
        avctx_opts[i]= avcodec_alloc_context2(i);
3780 3791
    }
3781 3792
    avformat_opts = av_alloc_format_context();
3793
#ifdef CONFIG_SWSCALER
3794
    sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, sws_flags, NULL,NULL,NULL);
3795
#endif
3782 3796

  
3783 3797
    if (argc <= 1)
3784 3798
        show_help();

Also available in: Unified diff