+ } else if (av_strstart(p, "crypto:", &p) && s->nb_streams > 0) {
+ // RFC 4568
+ rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1];
+ get_word(buf1, sizeof(buf1), &p); // ignore tag
+ get_word(rtsp_st->crypto_suite, sizeof(rtsp_st->crypto_suite), &p);
+ p += strspn(p, SPACE_CHARS);
+ if (av_strstart(p, "inline:", &p))
+ get_word(rtsp_st->crypto_params, sizeof(rtsp_st->crypto_params), &p);
+ } else if (av_strstart(p, "source-filter:", &p)) {
+ int exclude = 0;
+ get_word(buf1, sizeof(buf1), &p);
+ if (strcmp(buf1, "incl") && strcmp(buf1, "excl"))
+ return;
+ exclude = !strcmp(buf1, "excl");
+
+ get_word(buf1, sizeof(buf1), &p);
+ if (strcmp(buf1, "IN") != 0)
+ return;
+ get_word(buf1, sizeof(buf1), &p);
+ if (strcmp(buf1, "IP4") && strcmp(buf1, "IP6") && strcmp(buf1, "*"))
+ return;
+ // not checking that the destination address actually matches or is wildcard
+ get_word(buf1, sizeof(buf1), &p);
+
+ while (*p != '\0') {
+ rtsp_src = av_mallocz(sizeof(*rtsp_src));
+ if (!rtsp_src)
+ return;
+ get_word(rtsp_src->addr, sizeof(rtsp_src->addr), &p);
+ if (exclude) {
+ if (s->nb_streams == 0) {
+ dynarray_add(&s1->default_exclude_source_addrs, &s1->nb_default_exclude_source_addrs, rtsp_src);
+ } else {
+ rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1];
+ dynarray_add(&rtsp_st->exclude_source_addrs, &rtsp_st->nb_exclude_source_addrs, rtsp_src);
+ }
+ } else {
+ if (s->nb_streams == 0) {
+ dynarray_add(&s1->default_include_source_addrs, &s1->nb_default_include_source_addrs, rtsp_src);
+ } else {
+ rtsp_st = rt->rtsp_streams[rt->nb_rtsp_streams - 1];
+ dynarray_add(&rtsp_st->include_source_addrs, &rtsp_st->nb_include_source_addrs, rtsp_src);
+ }
+ }
+ }