[vlc-commits] packetizer: mpeg4audio: remove mostly useless memset

Francois Cartegnie git at videolan.org
Thu Feb 21 20:27:11 CET 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb 20 14:58:38 2019 +0100| [58e6f3dfd1d352084cf11ad3529ebedb699e1c92] | committer: Francois Cartegnie

packetizer: mpeg4audio: remove mostly useless memset

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

 modules/packetizer/mpeg4audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/packetizer/mpeg4audio.c b/modules/packetizer/mpeg4audio.c
index 03f039c329..4969aba9d1 100644
--- a/modules/packetizer/mpeg4audio.c
+++ b/modules/packetizer/mpeg4audio.c
@@ -551,8 +551,6 @@ static int Mpeg4ReadAudioChannelConfiguration(bs_t *s)
 
 static int Mpeg4ReadAudioSpecificConfig(bs_t *s, mpeg4_asc_t *p_cfg, bool b_withext)
 {
-    memset(p_cfg, 0, sizeof(*p_cfg));
-
     p_cfg->i_object_type = Mpeg4ReadAudioObjectType(s);
     p_cfg->i_samplerate = Mpeg4ReadAudioSamplerate(s);
     p_cfg->i_channel = Mpeg4ReadAudioChannelConfiguration(s);
@@ -562,6 +560,8 @@ static int Mpeg4ReadAudioSpecificConfig(bs_t *s, mpeg4_asc_t *p_cfg, bool b_with
     p_cfg->extension.i_object_type = 0;
     p_cfg->extension.i_samplerate = 0;
     p_cfg->extension.i_channel = -1;
+    p_cfg->i_frame_length = 0;
+
     if (p_cfg->i_object_type == AOT_AAC_SBR ||
         p_cfg->i_object_type == AOT_AAC_PS) {
         p_cfg->i_sbr = 1;



More information about the vlc-commits mailing list