[vlc-commits] chroma: cvpx: don't rely on parent filter owner

Thomas Guillem git at videolan.org
Tue Sep 19 10:21:07 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 19 10:11:21 2017 +0200| [2a0325413b1f1d57500fbc12428a7582f3f2937c] | committer: Thomas Guillem

chroma: cvpx: don't rely on parent filter owner

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

 modules/video_chroma/cvpx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/video_chroma/cvpx.c b/modules/video_chroma/cvpx.c
index e4621818b4..8af10d5993 100644
--- a/modules/video_chroma/cvpx.c
+++ b/modules/video_chroma/cvpx.c
@@ -108,6 +108,11 @@ static picture_t *CVPX_TO_I420_Filter(filter_t *p_filter, picture_t *src)
     return dst;
 }
 
+static picture_t *SW_buffer_new(filter_t *p_filter)
+{
+    return picture_NewFromFormat( &p_filter->fmt_out.video );
+}
+
 static picture_t *CVPX_buffer_new(filter_t *p_sw_filter)
 {
     filter_t *p_filter = p_sw_filter->owner.sys;
@@ -166,7 +171,7 @@ static int Open(vlc_object_t *obj)
         p_filter->pf_video_filter = CVPX_TO_I420_Filter; \
         i_sw_filter_in_chroma = VLC_CODEC_##x; \
         i_sw_filter_out_chroma = VLC_CODEC_I420; \
-        sw_filter_owner = p_filter->owner; \
+        sw_filter_owner.video.buffer_new = SW_buffer_new; \
         b_need_pool = false;
 
 #define CASE_CVPX_OUTPUT(x) \



More information about the vlc-commits mailing list