(My english is not that good.)
I am deeply grateful for Janus.
Exception handling seems necessary when extracting the profile from the following fmtp string if there is a space after the semicolon (;).
vfmtp ex)
blank_x = "packetization-mode=1;profile-level-id=4D401F;sprop-parameter-sets=SPS,PPS";
blank_o = "packetization-mode=1; profile-level-id=4D401F; sprop-parameter-sets=SPS,PPS"
test 1) janus_sdp_get_video_profile(JANUS_VIDEOCODEC_H264, blank_x)
--> result is "4D401F"
test 2) janus_sdp_get_video_profile(JANUS_VIDEOCODEC_H264, blank_o);
--> result is "=4D401F"
src/sdp-utils.c
char *janus_sdp_get_video_profile(janus_videocodec codec, const char *fmtp) {
...
while(index != NULL) {
if(strstr(index, needle) != NULL) {
profile = index + strlen(needle); <- *ADD WHITESPACE LENGTH*
if(strlen(profile) > 0)
profile = g_strdup(profile);
else
profile = NULL;
break;
}
...
}
...
}