[vlc-commits] ci_filters: fail earlier in case of wrong chromas
Thomas Guillem
git at videolan.org
Wed Sep 27 11:38:07 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Sep 27 10:48:17 2017 +0200| [5d42a862efdc5faa875dd642edfe15818818933b] | committer: Thomas Guillem
ci_filters: fail earlier in case of wrong chromas
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d42a862efdc5faa875dd642edfe15818818933b
---
modules/video_filter/ci_filters.m | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules/video_filter/ci_filters.m b/modules/video_filter/ci_filters.m
index 1e3e884a22..4ab6b200f6 100644
--- a/modules/video_filter/ci_filters.m
+++ b/modules/video_filter/ci_filters.m
@@ -534,6 +534,17 @@ Open(vlc_object_t *obj, char const *psz_filter)
{
filter_t *filter = (filter_t *)obj;
+ switch (filter->fmt_in.video.i_chroma)
+ {
+ case VLC_CODEC_CVPX_NV12:
+ case VLC_CODEC_CVPX_UYVY:
+ case VLC_CODEC_CVPX_I420:
+ case VLC_CODEC_CVPX_BGRA:
+ break;
+ default:
+ return VLC_EGENERIC;
+ }
+
filter->p_sys = calloc(1, sizeof(filter_sys_t));
if (!filter->p_sys)
return VLC_ENOMEM;
More information about the vlc-commits
mailing list