Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: source/patched-ffmpeg-mt/libavfilter/avfiltergraph.c

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * filter graphs 2 * filter graphs
3 * copyright (c) 2008 Vitor Sessak 3 * copyright (c) 2008 Vitor Sessak
4 * copyright (c) 2007 Bobby Bingham 4 * copyright (c) 2007 Bobby Bingham
5 * 5 *
6 * This file is part of FFmpeg. 6 * This file is part of FFmpeg.
7 * 7 *
8 * FFmpeg is free software; you can redistribute it and/or 8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 for(j = 0; j < filter->input_count; j ++) { 126 for(j = 0; j < filter->input_count; j ++) {
127 AVFilterLink *link = filter->inputs[j]; 127 AVFilterLink *link = filter->inputs[j];
128 if(link && link->in_formats != link->out_formats) { 128 if(link && link->in_formats != link->out_formats) {
129 if(!avfilter_merge_formats(link->in_formats, 129 if(!avfilter_merge_formats(link->in_formats,
130 link->out_formats)) { 130 link->out_formats)) {
131 AVFilterContext *scale; 131 AVFilterContext *scale;
132 char scale_args[256]; 132 char scale_args[256];
133 /* couldn't merge format lists. auto-insert scale filter */ 133 /* couldn't merge format lists. auto-insert scale filter */
134 snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d", 134 snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
135 scaler_count++); 135 scaler_count++);
136 scale = 136 avfilter_open(&scale, avfilter_get_by_name("scale"), inst_na me);
137 avfilter_open(avfilter_get_by_name("scale"),inst_name);
138 137
139 snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->sc ale_sws_opts); 138 snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->sc ale_sws_opts);
140 if(!scale || scale->filter->init(scale, scale_args, NULL) || 139 if(!scale || scale->filter->init(scale, scale_args, NULL) ||
141 avfilter_insert_filter(link, scale, 0, 0)) { 140 avfilter_insert_filter(link, scale, 0, 0)) {
142 avfilter_destroy(scale); 141 avfilter_destroy(scale);
143 return -1; 142 return -1;
144 } 143 }
145 144
146 if (avfilter_graph_add_filter(graph, scale) < 0) 145 if (avfilter_graph_add_filter(graph, scale) < 0)
147 return -1; 146 return -1;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 if(query_formats(graph, log_ctx)) 195 if(query_formats(graph, log_ctx))
197 return -1; 196 return -1;
198 197
199 /* Once everything is merged, it's possible that we'll still have 198 /* Once everything is merged, it's possible that we'll still have
200 * multiple valid media format choices. We pick the first one. */ 199 * multiple valid media format choices. We pick the first one. */
201 pick_formats(graph); 200 pick_formats(graph);
202 201
203 return 0; 202 return 0;
204 } 203 }
205 204
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavfilter/avfilter.c ('k') | source/patched-ffmpeg-mt/libavfilter/defaults.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698