Skip to content

Commit

Permalink
Fix to ext_fmts accessed out of stack scope. (#3916)
Browse files Browse the repository at this point in the history
  • Loading branch information
amubiera authored Apr 15, 2024
1 parent 6d114d7 commit 12d0468
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pjsip/src/pjsua-lib/pjsua_aud.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ pj_status_t pjsua_aud_subsys_init()
unsigned opt;
pjmedia_audio_codec_config codec_cfg;
pj_status_t status;
#if PJMEDIA_HAS_PASSTHROUGH_CODECS
pjmedia_format ext_fmts[32];
#endif

/* To suppress warning about unused var when all codecs are disabled */
PJ_UNUSED_ARG(codec_id);
Expand All @@ -305,7 +308,6 @@ pj_status_t pjsua_aud_subsys_init()
{
unsigned aud_idx;
unsigned ext_fmt_cnt = 0;
pjmedia_format ext_fmts[32];

/* List extended formats supported by audio devices */
for (aud_idx = 0; aud_idx < pjmedia_aud_dev_count(); ++aud_idx) {
Expand Down

0 comments on commit 12d0468

Please sign in to comment.