Loading media/libstagefright/codecs/amrnb/common/src/lsp.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ Word16 lsp_init(lspState **st) *st = NULL; /* allocate memory */ if ((s = (lspState *) malloc(sizeof(lspState))) == NULL) if ((s = (lspState *) calloc(sizeof(lspState), 1)) == NULL) { /* fprintf(stderr, "lsp_init: can not malloc state structure\n"); */ return -1; Loading @@ -182,11 +182,13 @@ Word16 lsp_init(lspState **st) /* Initialize quantization state */ if (0 != Q_plsf_init(&s->qSt)) { lsp_exit(&s); return -1; } if (0 != lsp_reset(s)) { lsp_exit(&s); return -1; } Loading media/libstagefright/codecs/amrnb/dec/src/sp_dec.cpp +1 −7 Original line number Diff line number Diff line Loading @@ -268,13 +268,7 @@ Word16 GSMInitDecode(void **state_data, if (Decoder_amr_init(&s->decoder_amrState) || Post_Process_reset(&s->postHP_state)) { Speech_Decode_FrameState *tmp = s; /* * dereferencing type-punned pointer avoid * breaking strict-aliasing rules */ void** tempVoid = (void**) tmp; GSMDecodeFrameExit(tempVoid); free(s); return (-1); } Loading Loading
media/libstagefright/codecs/amrnb/common/src/lsp.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ Word16 lsp_init(lspState **st) *st = NULL; /* allocate memory */ if ((s = (lspState *) malloc(sizeof(lspState))) == NULL) if ((s = (lspState *) calloc(sizeof(lspState), 1)) == NULL) { /* fprintf(stderr, "lsp_init: can not malloc state structure\n"); */ return -1; Loading @@ -182,11 +182,13 @@ Word16 lsp_init(lspState **st) /* Initialize quantization state */ if (0 != Q_plsf_init(&s->qSt)) { lsp_exit(&s); return -1; } if (0 != lsp_reset(s)) { lsp_exit(&s); return -1; } Loading
media/libstagefright/codecs/amrnb/dec/src/sp_dec.cpp +1 −7 Original line number Diff line number Diff line Loading @@ -268,13 +268,7 @@ Word16 GSMInitDecode(void **state_data, if (Decoder_amr_init(&s->decoder_amrState) || Post_Process_reset(&s->postHP_state)) { Speech_Decode_FrameState *tmp = s; /* * dereferencing type-punned pointer avoid * breaking strict-aliasing rules */ void** tempVoid = (void**) tmp; GSMDecodeFrameExit(tempVoid); free(s); return (-1); } Loading