diff mbox

[FFmpeg-devel,13/15] vf_hwmap: Pass mapping mode when deriving frames context on an existing device

Message ID 20171114194730.11052-14-sw@jkqxz.net
State New
Headers show

Commit Message

Mark Thompson Nov. 14, 2017, 7:47 p.m. UTC
To match creation on a newly-derived device.  (This was missed earlier
because the mode is only used in some cases.)
---
 libavfilter/vf_hwmap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c
index 8277241dc4..d5fc3c46e6 100644
--- a/libavfilter/vf_hwmap.c
+++ b/libavfilter/vf_hwmap.c
@@ -114,7 +114,8 @@  static int hwmap_config_output(AVFilterLink *outlink)
             err = av_hwframe_ctx_create_derived(&ctx->hwframes_ref,
                                                 outlink->format,
                                                 device,
-                                                inlink->hw_frames_ctx, 0);
+                                                inlink->hw_frames_ctx,
+                                                ctx->mode);
             if (err < 0) {
                 av_log(avctx, AV_LOG_ERROR, "Failed to create derived "
                        "frames context: %d.\n", err);