[vlc-commits] filter/win32: use constant callback structures

Rémi Denis-Courmont git at videolan.org
Sun Jun 10 16:44:30 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 10 15:37:00 2018 +0300| [43b42accf868690ee057be63119dad82465a27e8] | committer: Rémi Denis-Courmont

filter/win32: use constant callback structures

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=43b42accf868690ee057be63119dad82465a27e8
---

 modules/hw/d3d11/d3d11_surface.c | 3 ++-
 modules/hw/d3d9/dxa9.c           | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index 93e7c3baae..2085e29231 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -525,8 +525,9 @@ static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in
     if (unlikely(p_filter == NULL))
         return NULL;
 
+    static const struct filter_video_callbacks cbs = { NewBuffer };
     p_filter->b_allow_fmt_out_change = false;
-    p_filter->owner.video.buffer_new = NewBuffer;
+    p_filter->owner.video = &cbs;
     p_filter->owner.sys = p_this;
 
     es_format_InitFromVideo( &p_filter->fmt_in,  &p_fmt_in->video );
diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index 781b60b10f..26c955ebfb 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -205,8 +205,9 @@ static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in
     if (unlikely(p_filter == NULL))
         return NULL;
 
+    static const struct filter_video_callbacks cbs = { NewBuffer };
     p_filter->b_allow_fmt_out_change = false;
-    p_filter->owner.video.buffer_new = NewBuffer;
+    p_filter->owner.video = &cbs;
     p_filter->owner.sys = p_this;
 
     es_format_InitFromVideo( &p_filter->fmt_in,  &p_fmt_in->video );



More information about the vlc-commits mailing list