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 /modules/avcodec | |
parent | 503944520f94545daace7e6236265362560da960 (diff) |
vidcodec: make the API re-entrant
Diffstat (limited to 'modules/avcodec')
-rw-r--r-- | modules/avcodec/avcodec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/avcodec/avcodec.c b/modules/avcodec/avcodec.c index 5144403..f8d9830 100644 --- a/modules/avcodec/avcodec.c +++ b/modules/avcodec/avcodec.c @@ -183,6 +183,7 @@ static struct vidcodec mpg4 = { static int module_init(void) { + struct list *vidcodecl = baresip_vidcodecl(); char h264enc[64]; char h264dec[64]; @@ -209,18 +210,18 @@ static int module_init(void) h264dec); return ENOENT; } - vidcodec_register(&h264); + vidcodec_register(vidcodecl, &h264); } else { if (avcodec_find_decoder(AV_CODEC_ID_H264)) - vidcodec_register(&h264); + vidcodec_register(vidcodecl, &h264); } if (avcodec_find_decoder(AV_CODEC_ID_H263)) - vidcodec_register(&h263); + vidcodec_register(vidcodecl, &h263); if (avcodec_find_decoder(AV_CODEC_ID_MPEG4)) - vidcodec_register(&mpg4); + vidcodec_register(vidcodecl, &mpg4); if (0 == conf_get_str(conf_cur(), "avcodec_h264enc", h264enc, sizeof(h264enc))) { |