History

lavfi: allow building without swscale.

Anton Khirnov committed 14 years ago

Commit 2f296e31 parent a4880284 files · +13 −9Browse files

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

Unified · Split

libavfilter/avfiltergraph.c+7−2
@@ -213,11 +213,16 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 212 unmodified lines
213213 /* couldn't merge format lists. auto-insert conversion filter */
214214 switch (link->type) {
215215 case AVMEDIA_TYPE_VIDEO:
216+ if (!(filter = avfilter_get_by_name("scale"))) {
217+ av_log(log_ctx, AV_LOG_ERROR, "'scale' filter "
218+ "not present, cannot convert pixel formats.\n");
219+ return AVERROR(EINVAL);
220+ }
221+
216222 snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
217223 scaler_count++);
218224 snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts);
219− if ((ret = avfilter_graph_create_filter(&convert,
220− avfilter_get_by_name("scale"),
225+ if ((ret = avfilter_graph_create_filter(&convert, filter,
221226 inst_name, scale_args, NULL,
222227 graph)) < 0)
223228 return ret;

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