dr_81: revert previous patch, use calloc instead

[email protected] (Michael Krufky)
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <[email protected]>
libdvbpsi | branch: master | Michael Krufky <[email protected]> | Tue Feb  4 22:09:50 2014 -0500| [4272bb9f0d27fddef19e3600d917a888067dd32c] | committer: Michael Krufky

dr_81: revert previous patch, use calloc instead

Signed-off-by: Michael Krufky <[email protected]>

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=4272bb9f0d27fddef19e3600d917a888067dd32c
---

 src/descriptors/dr_81.c |    4 +---
 1 file changed, 1 insertion(+), 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);

_______________________________________________
libdvbpsi-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvbpsi-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.