[vlc-commits] image: remove ugly cast
Thomas Guillem
git at videolan.org
Tue Sep 19 10:21:02 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Sep 18 17:03:32 2017 +0200| [242a8af9fb6eba656d429af0bc1cee3dc5cc81ac] | committer: Thomas Guillem
image: remove ugly cast
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=242a8af9fb6eba656d429af0bc1cee3dc5cc81ac
---
src/misc/image.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/misc/image.c b/src/misc/image.c
index d9e8b9c9e6..aa5dd43a2d 100644
--- a/src/misc/image.c
+++ b/src/misc/image.c
@@ -762,14 +762,18 @@ static void DeleteEncoder( encoder_t * p_enc )
p_enc = NULL;
}
+static picture_t *filter_new_picture( filter_t *p_filter )
+{
+ return picture_NewFromFormat( &p_filter->fmt_out.video );
+}
+
static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in,
const video_format_t *p_fmt_out )
{
filter_t *p_filter;
p_filter = vlc_custom_create( p_this, sizeof(filter_t), "filter" );
- p_filter->owner.video.buffer_new =
- (picture_t *(*)(filter_t *))video_new_buffer;
+ p_filter->owner.video.buffer_new = filter_new_picture;
es_format_Copy( &p_filter->fmt_in, p_fmt_in );
es_format_Copy( &p_filter->fmt_out, p_fmt_in );
More information about the vlc-commits
mailing list