summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2017-03-29 23:39:40 +0200
committerMatthieu Bouron <matthieu.bouron@gmail.com>2017-03-30 00:02:08 +0200
commitb5e1ec5660692d7cee360da3ed0434d3b46f40d5 (patch)
tree853ecad2f21623a52a15577dca710c337823a6c6 /libavfilter/avfilter.c
parent78e871ebbcc6f3c877e7292c4dda0c9979f8ede4 (diff)
parente3fb74f7f9a8f1895381355f40c92cac3c1023d9 (diff)
Merge commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9'
* commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9': lavfi: Always propagate hw_frames_ctx through links Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index b431990edc..ecfb872ed8 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -355,14 +355,12 @@ int avfilter_config_links(AVFilterContext *filter)
}
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;
-
- if (input_ctx->format == link->format) {
- link->hw_frames_ctx = av_buffer_ref(link->src->inputs[0]->hw_frames_ctx);
- if (!link->hw_frames_ctx)
- return AVERROR(ENOMEM);
- }
+ !(link->src->filter->flags_internal & FF_FILTER_FLAG_HWFRAME_AWARE)) {
+ av_assert0(!link->hw_frames_ctx &&
+ "should not be set by non-hwframe-aware filter");
+ link->hw_frames_ctx = av_buffer_ref(link->src->inputs[0]->hw_frames_ctx);
+ if (!link->hw_frames_ctx)
+ return AVERROR(ENOMEM);
}
if ((config_link = link->dstpad->config_props))