aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2014-02-05 03:09:50 (GMT)
committerMichael Krufky <mkrufky@linuxtv.org>2014-02-05 03:09:50 (GMT)
commit4272bb9f0d27fddef19e3600d917a888067dd32c (patch)
tree7ff4a76be50780976bc78675cf87ee4439d65ee2
parent990aacdb898c0d2bab6a114de02a83814bb211d2 (diff)
dr_81: revert previous patch, use calloc insteadHEADmaster
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
-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