Commited in SoC by Bobby Bingham on 2007-12-24 03:22:10
Originally committed as revision 12717 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -101,7 +101,6 @@ static inline AVFilterLink *get_extern_output_link(AVFilterLink *link) |
| 101 | 101 |
static int link_out_config_props(AVFilterLink *link) |
| 102 | 102 |
{
|
| 103 | 103 |
AVFilterLink *link2 = get_extern_output_link(link); |
| 104 |
- int (*config_props)(AVFilterLink *); |
|
| 105 | 104 |
|
| 106 | 105 |
if(!link2) |
| 107 | 106 |
return 0; |
| ... | ... |
@@ -109,9 +108,7 @@ static int link_out_config_props(AVFilterLink *link) |
| 109 | 109 |
link2->w = link->w; |
| 110 | 110 |
link2->h = link->h; |
| 111 | 111 |
|
| 112 |
- if(!(config_props = link2->dst->input_pads[link2->dstpad].config_props)) |
|
| 113 |
- config_props = avfilter_default_config_input_link; |
|
| 114 |
- return config_props(link2); |
|
| 112 |
+ return 0; |
|
| 115 | 113 |
} |
| 116 | 114 |
|
| 117 | 115 |
static void link_out_start_frame(AVFilterLink *link, AVFilterPicRef *picref) |
| ... | ... |
@@ -203,6 +200,7 @@ static int graph_in_config_props(AVFilterLink *link) |
| 203 | 203 |
{
|
| 204 | 204 |
AVFilterLink *link2 = get_intern_input_link(link); |
| 205 | 205 |
int (*config_props)(AVFilterLink *); |
| 206 |
+ int ret; |
|
| 206 | 207 |
|
| 207 | 208 |
if(!link2) |
| 208 | 209 |
return -1; |
| ... | ... |
@@ -215,7 +213,12 @@ static int graph_in_config_props(AVFilterLink *link) |
| 215 | 215 |
if(!(config_props = link2->dst->input_pads[link2->dstpad].config_props)) |
| 216 | 216 |
return 0; /* FIXME? */ |
| 217 | 217 |
//config_props = avfilter_default_config_input_link; |
| 218 |
- return config_props(link2); |
|
| 218 |
+ if(!(ret = config_props(link2))) |
|
| 219 |
+ link2->init_state = AVLINK_INIT; |
|
| 220 |
+ else |
|
| 221 |
+ link2->init_state = AVLINK_STARTINIT; |
|
| 222 |
+ |
|
| 223 |
+ return ret; |
|
| 219 | 224 |
} |
| 220 | 225 |
|
| 221 | 226 |
static AVFilterLink *get_intern_output_link(AVFilterLink *link) |
| ... | ... |
@@ -235,26 +238,21 @@ static int graph_out_request_frame(AVFilterLink *link) |
| 235 | 235 |
|
| 236 | 236 |
static int graph_out_config_props(AVFilterLink *link) |
| 237 | 237 |
{
|
| 238 |
- AVFilterLink *link2 = get_intern_output_link(link); |
|
| 239 |
- int (*config_props)(AVFilterLink *); |
|
| 238 |
+ GraphContext *graph = link->src->priv; |
|
| 239 |
+ AVFilterLink *link2 = graph->link_filter_out->inputs[link->srcpad]; |
|
| 240 | 240 |
int ret; |
| 241 | 241 |
|
| 242 |
+ if((ret = avfilter_config_links(graph->link_filter_out))) |
|
| 243 |
+ return ret; |
|
| 244 |
+ |
|
| 242 | 245 |
if(!link2) |
| 243 | 246 |
return 0; |
| 244 | 247 |
|
| 245 |
- link2->w = link->w; |
|
| 246 |
- link2->h = link->h; |
|
| 247 |
- link2->format = link->format; |
|
| 248 |
- |
|
| 249 |
- if(!(config_props = link2->src->output_pads[link2->srcpad].config_props)) |
|
| 250 |
- config_props = avfilter_default_config_output_link; |
|
| 251 |
- ret = config_props(link2); |
|
| 252 |
- |
|
| 253 | 248 |
link->w = link2->w; |
| 254 | 249 |
link->h = link2->h; |
| 255 | 250 |
link->format = link2->format; |
| 256 | 251 |
|
| 257 |
- return ret; |
|
| 252 |
+ return 0; |
|
| 258 | 253 |
} |
| 259 | 254 |
|
| 260 | 255 |
static int add_graph_input(AVFilterContext *gctx, AVFilterContext *filt, unsigned idx, |
| ... | ... |
@@ -477,27 +475,6 @@ int avfilter_graph_config_formats(AVFilterContext *graphctx) |
| 477 | 477 |
return 0; |
| 478 | 478 |
} |
| 479 | 479 |
|
| 480 |
-int avfilter_graph_config_links(AVFilterContext *graphctx) |
|
| 481 |
-{
|
|
| 482 |
- GraphContext *graph = graphctx->priv; |
|
| 483 |
- int i, j; |
|
| 484 |
- |
|
| 485 |
- for(i = 0; i < graph->filter_count; i ++) {
|
|
| 486 |
- for(j = 0; j < graph->filters[i]->input_count; j ++) {
|
|
| 487 |
- /* ensure that graphs contained within graphs are configured */ |
|
| 488 |
- if((graph->filters[i]->filter == &avfilter_vf_graph || |
|
| 489 |
- graph->filters[i]->filter == &avfilter_vf_graphfile || |
|
| 490 |
- graph->filters[i]->filter == &avfilter_vf_graphdesc) && |
|
| 491 |
- avfilter_graph_config_links(graph->filters[i])) |
|
| 492 |
- return -1; |
|
| 493 |
- if(avfilter_config_link(graph->filters[i]->inputs[j])) |
|
| 494 |
- return -1; |
|
| 495 |
- } |
|
| 496 |
- } |
|
| 497 |
- |
|
| 498 |
- return 0; |
|
| 499 |
-} |
|
| 500 |
- |
|
| 501 | 480 |
static int graph_load_from_desc(AVFilterContext *ctx, AVFilterGraphDesc *desc) |
| 502 | 481 |
{
|
| 503 | 482 |
AVFilterGraphDescFilter *curfilt; |