summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-06-21 19:39:51 +0200
committerAnton Khirnov <anton@khirnov.net>2016-06-25 11:11:46 +0200
commit5b63b15663d31f50ce45d980b904a68795ad3f7a (patch)
treee841f4453e08e0ba39c033916fa5bdfb0a2dfbcb
parent0c9c4004ed57de210b4d83c7b39bbfb00b86b9af (diff)
lavfi: set the link hwframes context before configuring the dst input
The destination filter might expect the hw frames context to be already set (this is the case e.g. for hwdownload).
-rw-r--r--libavfilter/avfilter.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 190d8ab03c..1cedb15db4 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -211,14 +211,6 @@ int avfilter_config_links(AVFilterContext *filter)
}
}
- if ((config_link = link->dstpad->config_props))
- if ((ret = config_link(link)) < 0) {
- av_log(link->dst, AV_LOG_ERROR,
- "Failed to configure input pad on %s\n",
- link->dst->name);
- return ret;
- }
-
if (link->src->nb_inputs && link->src->inputs[0]->hw_frames_ctx &&
!link->hw_frames_ctx) {
AVHWFramesContext *input_ctx = (AVHWFramesContext*)link->src->inputs[0]->hw_frames_ctx->data;
@@ -230,6 +222,14 @@ int avfilter_config_links(AVFilterContext *filter)
}
}
+ if ((config_link = link->dstpad->config_props))
+ if ((ret = config_link(link)) < 0) {
+ av_log(link->dst, AV_LOG_ERROR,
+ "Failed to configure input pad on %s\n",
+ link->dst->name);
+ return ret;
+ }
+
link->init_state = AVLINK_INIT;
}
}