Commit 4272bb9f authored by Michael Krufky's avatar Michael Krufky

dr_81: revert previous patch, use calloc instead

Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
parent 990aacdb
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment