[vlc-commits] chroma:i420_nv12: only allow pixel copy, no resizing

Steve Lhomme git at videolan.org
Thu May 12 13:35:12 CEST 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu May 12 12:17:19 2016 +0200| [bbbafc35be74f6c5880402dd4ac81c494c2b755c] | committer: Jean-Baptiste Kempf

chroma:i420_nv12: only allow pixel copy, no resizing

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_chroma/i420_nv12.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/video_chroma/i420_nv12.c b/modules/video_chroma/i420_nv12.c
index f15798e..da16349 100644
--- a/modules/video_chroma/i420_nv12.c
+++ b/modules/video_chroma/i420_nv12.c
@@ -69,8 +69,11 @@ static int Create( vlc_object_t *p_this )
         return -1;
     }
 
-    if( p_filter->fmt_in.video.i_width != p_filter->fmt_out.video.i_width
-       || p_filter->fmt_in.video.i_height != p_filter->fmt_out.video.i_height
+    /* resizing not supported */
+    if( p_filter->fmt_in.video.i_x_offset + p_filter->fmt_in.video.i_visible_width !=
+            p_filter->fmt_out.video.i_x_offset + p_filter->fmt_out.video.i_visible_width
+       || p_filter->fmt_in.video.i_y_offset + p_filter->fmt_in.video.i_visible_height !=
+            p_filter->fmt_out.video.i_y_offset + p_filter->fmt_out.video.i_visible_height
        || p_filter->fmt_in.video.orientation != p_filter->fmt_out.video.orientation )
         return -1;
 



More information about the vlc-commits mailing list