[vlc-commits] text_renderer: svg: reject unknown pixbuf
Francois Cartegnie
git at videolan.org
Tue Dec 6 20:53:33 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Dec 6 20:48:03 2016 +0100| [828490b9446f9e4a7d5a791f76bd257ca1f61be4] | committer: Francois Cartegnie
text_renderer: svg: reject unknown pixbuf
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=828490b9446f9e4a7d5a791f76bd257ca1f61be4
---
modules/text_renderer/svg.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/text_renderer/svg.c b/modules/text_renderer/svg.c
index 7a544c1..46a9d90 100644
--- a/modules/text_renderer/svg.c
+++ b/modules/text_renderer/svg.c
@@ -265,6 +265,14 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
i_width = gdk_pixbuf_get_width( p_svg->p_rendition );
i_height = gdk_pixbuf_get_height( p_svg->p_rendition );
+ if( gdk_pixbuf_get_colorspace( p_svg->p_rendition ) != GDK_COLORSPACE_RGB )
+ {
+ g_object_unref( p_svg->p_rendition );
+ p_svg->p_rendition = NULL;
+ msg_Err( p_filter, "Unsupported colorspace" );
+ return VLC_EGENERIC;
+ }
+
/* Create a new subpicture region */
video_format_Init( &fmt, VLC_CODEC_YUVA );
fmt.i_width = fmt.i_visible_width = i_width;
More information about the vlc-commits
mailing list