[vlc-commits] chroma:i420_nv12: only allow NV12 output

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:18 2016 +0200| [57d593b4782f56208f6de1b2206e1c8e9ba1eabb] | committer: Jean-Baptiste Kempf

chroma:i420_nv12: only allow NV12 output

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

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

 modules/video_chroma/i420_nv12.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/video_chroma/i420_nv12.c b/modules/video_chroma/i420_nv12.c
index 25d9473..f15798e 100644
--- a/modules/video_chroma/i420_nv12.c
+++ b/modules/video_chroma/i420_nv12.c
@@ -60,6 +60,9 @@ static int Create( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t *)p_this;
 
+    if ( p_filter->fmt_out.video.i_chroma != VLC_CODEC_NV12 )
+        return -1;
+
     if( p_filter->fmt_in.video.i_width & 1
      || p_filter->fmt_in.video.i_height & 1 )
     {



More information about the vlc-commits mailing list