diff options
author | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2017-05-20 20:19:50 +0200 |
---|---|---|
committer | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2017-05-20 20:19:50 +0200 |
commit | 7db06fe42f40366c29ab328173ec6c2bffd9ba40 (patch) | |
tree | b00b4b39edf089d5cfbb2b57c0bc3f8cc19f3f97 /src/account.c | |
parent | 503944520f94545daace7e6236265362560da960 (diff) |
vidcodec: make the API re-entrant
Diffstat (limited to 'src/account.c')
-rw-r--r-- | src/account.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/account.c b/src/account.c index 6142a2e..e23d5c8 100644 --- a/src/account.c +++ b/src/account.c @@ -245,6 +245,7 @@ static int audio_codecs_decode(struct account *acc, const struct pl *prm) #ifdef USE_VIDEO static int video_codecs_decode(struct account *acc, const struct pl *prm) { + struct list *vidcodecl = baresip_vidcodecl(); struct pl tmp; if (!acc || !prm) @@ -263,7 +264,8 @@ static int video_codecs_decode(struct account *acc, const struct pl *prm) while (0 == csl_parse(&vcs, cname, sizeof(cname))) { struct vidcodec *vc; - vc = (struct vidcodec *)vidcodec_find(cname, NULL); + vc = (struct vidcodec *)vidcodec_find(vidcodecl, + cname, NULL); if (!vc) { warning("account: video codec not found: %s\n", cname); @@ -487,7 +489,7 @@ struct list *account_aucodecl(const struct account *acc) struct list *account_vidcodecl(const struct account *acc) { return (acc && !list_isempty(&acc->vidcodecl)) - ? (struct list *)&acc->vidcodecl : vidcodec_list(); + ? (struct list *)&acc->vidcodecl : baresip_vidcodecl(); } #endif |