aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/descriptors/dr_81.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/descriptors/dr_81.c b/src/descriptors/dr_81.c
index 31a7e77..263a483 100644
--- a/src/descriptors/dr_81.c
+++ b/src/descriptors/dr_81.c
@@ -59,12 +59,10 @@ dvbpsi_ac3_audio_dr_t *dvbpsi_DecodeAc3AudioDr(dvbpsi_descriptor_t *p_descriptor
if (p_descriptor->i_length < 3)
return NULL;
- p_decoded = (dvbpsi_ac3_audio_dr_t*)malloc(sizeof(dvbpsi_ac3_audio_dr_t));
+ p_decoded = (dvbpsi_ac3_audio_dr_t*)calloc(1, sizeof(dvbpsi_ac3_audio_dr_t));
if (!p_decoded)
return NULL;
- memset(p_decoded, 0, sizeof (dvbpsi_ac3_audio_dr_t));
-
p_descriptor->p_decoded = (void*)p_decoded;
p_decoded->i_sample_rate_code = 0x07 & (buf[0] >> 5);

Privacy Policy