History

Implement in AVFilterGraph the scale_sws_opts field, and pass its value in the args for the auto-inserted scale filters.

Originally committed as revision 17547 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 17 years ago

Commit 39c07b81 parent cacb8213 files · +7 −2Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 3 files). Show all

Unified · Split

libavfilter/avfiltergraph.c+4−1
@@ -30,6 +30,7 @@ void avfilter_destroy_graph(AVFilterGraph *graph) · 29 unmodified lines
3030 {
3131 for(; graph->filter_count > 0; graph->filter_count --)
3232 avfilter_destroy(graph->filters[graph->filter_count - 1]);
33+ av_freep(&graph->scale_sws_opts);
3334 av_freep(&graph->filters);
3435 }
3536
@@ -111,13 +112,15 @@ static int query_formats(AVFilterGraph *graph) · 75 unmodified lines
111112 if(!avfilter_merge_formats(link->in_formats,
112113 link->out_formats)) {
113114 AVFilterContext *scale;
115+ char scale_args[256];
114116 /* couldn't merge format lists. auto-insert scale filter */
115117 snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
116118 scaler_count);
117119 scale =
118120 avfilter_open(avfilter_get_by_name("scale"),inst_name);
119121
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) ||
121124 avfilter_insert_filter(link, scale, 0, 0)) {
122125 avfilter_destroy(scale);
123126 return -1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t