[vlc-commits] core: replace encoder_sys_t* by void*
Romain Vimont
git at videolan.org
Thu Apr 26 01:43:00 CEST 2018
vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Mon Apr 23 19:13:23 2018 +0200| [7442c8c791ec6be8c50ba7768792b52a01ee2b31] | committer: Jean-Baptiste Kempf
core: replace encoder_sys_t* by void*
See #17078
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7442c8c791ec6be8c50ba7768792b52a01ee2b31
---
include/vlc_codec.h | 2 +-
modules/codec/opus.c | 2 +-
modules/codec/png.c | 6 ++++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index 0ba09d736d..41aa99cb0b 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -213,7 +213,7 @@ struct encoder_t
/* Module properties */
module_t * p_module;
- encoder_sys_t * p_sys;
+ void *p_sys;
/* Properties of the input data fed to the encoder */
es_format_t fmt_in;
diff --git a/modules/codec/opus.c b/modules/codec/opus.c
index 01295d5991..696c0d3637 100644
--- a/modules/codec/opus.c
+++ b/modules/codec/opus.c
@@ -684,7 +684,7 @@ static int OpenEncoder(vlc_object_t *p_this)
sys->i_nb_samples = 0;
sys->i_samples_delay = 0;
- int ret = opus_multistream_encoder_ctl(enc->p_sys->enc,
+ int ret = opus_multistream_encoder_ctl(sys->enc,
OPUS_GET_LOOKAHEAD(&sys->i_samples_delay));
if (ret != OPUS_OK)
msg_Err(enc, "Unable to get number of lookahead samples: %s\n",
diff --git a/modules/codec/png.c b/modules/codec/png.c
index d8af7c58c8..b37a58a981 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -337,13 +337,15 @@ static int OpenEncoder(vlc_object_t *p_this)
return VLC_EGENERIC;
/* Allocate the memory needed to store the encoder's structure */
+ encoder_sys_t *p_sys = malloc( sizeof(encoder_sys_t) );
p_enc->p_sys = malloc( sizeof(encoder_sys_t) );
if( p_enc->p_sys == NULL )
return VLC_ENOMEM;
+ p_enc->p_sys = p_sys;
- p_enc->p_sys->p_obj = p_this;
+ p_sys->p_obj = p_this;
- p_enc->p_sys->i_blocksize = 3 * p_enc->fmt_in.video.i_visible_width *
+ p_sys->i_blocksize = 3 * p_enc->fmt_in.video.i_visible_width *
p_enc->fmt_in.video.i_visible_height;
p_enc->fmt_in.i_codec = VLC_CODEC_RGB24;
More information about the vlc-commits
mailing list