Skip to content

Commit

Permalink
Fixed WebRTC AEC3 alignment issue on Linux ARMv7 (#4228)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming authored Dec 20, 2024
1 parent cb85368 commit dc3bb71
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pjmedia/src/pjmedia/echo_webrtc_aec3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@ PJ_DEF(pj_status_t) webrtc_aec3_create(pj_pool_t *pool,
webrtc_ec *echo;

*p_echo = NULL;


#if WEBRTC_LINUX == 1 && defined(WEBRTC_ARCH_ARM_V7)
/* Workaround to fix alignment trap issue on Linux ARMv7 machine. */
echo = new webrtc_ec();
#else
echo = PJ_POOL_ZALLOC_T(pool, webrtc_ec);
#endif
PJ_ASSERT_RETURN(echo != NULL, PJ_ENOMEM);

if (clock_rate != 16000 && clock_rate != 32000 && clock_rate != 48000) {
Expand Down Expand Up @@ -152,6 +157,10 @@ PJ_DEF(pj_status_t) webrtc_aec3_destroy(void *state )
echo->rend_buf = NULL;
}

#if WEBRTC_LINUX == 1 && defined(WEBRTC_ARCH_ARM_V7)
delete echo;
#endif

return PJ_SUCCESS;
}

Expand Down

0 comments on commit dc3bb71

Please sign in to comment.