FS-10209: [freeswitch-core,mod_av] Add auth params to file handles #resolve

This commit is contained in:
Anthony Minessale committed 2017-04-04 11:42:29 -05:00
1 parent 9c61f364f0
commit acd0384ee5
3 files changed
+21

No files matched your search

+11
View File
@@ -391,6 +391,17 @@ static switch_status_t add_stream(MediaStream *mst, AVFormatContext *fc, AVCodec
c->codec_id = codec_id;
if (mm->auth_username) {
char tmp[256] = "";
switch_snprintf(tmp, sizeof(tmp), "pubUser=%s", mm->auth_username);
av_set_options_string(c, tmp, "=", ":");
if (mm->auth_password) {
switch_snprintf(tmp, sizeof(tmp), "pubPasswd=%s", mm->auth_password);
av_set_options_string(c, tmp, "=", ":");
}
}
/* Resolution must be a multiple of two. */
c->width = mst->width;
c->height = mst->height;