Revision 39c07b8e

View differences:

libavfilter/avfilter.h
23 23
#define AVFILTER_AVFILTER_H
24 24

  
25 25
#define LIBAVFILTER_VERSION_MAJOR  0
26
#define LIBAVFILTER_VERSION_MINOR  3
26
#define LIBAVFILTER_VERSION_MINOR  4
27 27
#define LIBAVFILTER_VERSION_MICRO  0
28 28

  
29 29
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
libavfilter/avfiltergraph.c
30 30
{
31 31
    for(; graph->filter_count > 0; graph->filter_count --)
32 32
        avfilter_destroy(graph->filters[graph->filter_count - 1]);
33
    av_freep(&graph->scale_sws_opts);
33 34
    av_freep(&graph->filters);
34 35
}
35 36

  
......
111 112
                if(!avfilter_merge_formats(link->in_formats,
112 113
                                           link->out_formats)) {
113 114
                    AVFilterContext *scale;
115
                    char scale_args[256];
114 116
                    /* couldn't merge format lists. auto-insert scale filter */
115 117
                    snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
116 118
                             scaler_count);
117 119
                    scale =
118 120
                        avfilter_open(avfilter_get_by_name("scale"),inst_name);
119 121

  
120
                    if(!scale || scale->filter->init(scale, NULL, NULL) ||
122
                    snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts);
123
                    if(!scale || scale->filter->init(scale, scale_args, NULL) ||
121 124
                                 avfilter_insert_filter(link, scale, 0, 0)) {
122 125
                        avfilter_destroy(scale);
123 126
                        return -1;
libavfilter/avfiltergraph.h
27 27
typedef struct AVFilterGraph {
28 28
    unsigned filter_count;
29 29
    AVFilterContext **filters;
30

  
31
    char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
30 32
} AVFilterGraph;
31 33

  
32 34
/**

Also available in: Unified diff