[FFmpeg-devel] [PATCH 22/24] avfilter/vf_setrange: change outlink color_range too
Paul B Mahol
onemda at gmail.com
Wed Dec 13 12:59:38 EET 2017
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavfilter/vf_setparams.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c
index 8427f98ba8..98a4aa2ad3 100644
--- a/libavfilter/vf_setparams.c
+++ b/libavfilter/vf_setparams.c
@@ -56,6 +56,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
return ff_filter_frame(ctx->outputs[0], frame);
}
+static int config_output(AVFilterLink *outlink)
+{
+ SetParamsContext *s = outlink->src->priv;
+
+ if (s->color_range >= 0)
+ outlink->color_range = s->color_range;
+
+ return 0;
+}
+
static const AVFilterPad inputs[] = {
{
.name = "default",
@@ -69,6 +79,7 @@ static const AVFilterPad outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
+ .config_props = config_output,
},
{ NULL }
};
--
2.11.0
More information about the ffmpeg-devel
mailing list