libavfilter/avfilter.c:685: error: Memory Leak
  memory dynamically allocated by call to `av_strdup()` at line 652, column 26 is not reachable after line 685, column 13.

libavfilter/avfilter.c:596:1: start of procedure avfilter_init_str()
594. }
595. 
596. int avfilter_init_str(AVFilterContext *filter, const char *args)
     ^
597. {
598.     AVDictionary *options = NULL;

libavfilter/avfilter.c:598:5: 
596. int avfilter_init_str(AVFilterContext *filter, const char *args)
597. {
598.     AVDictionary *options = NULL;
         ^
599.     AVDictionaryEntry *e;
600.     int ret = 0;

libavfilter/avfilter.c:600:5: 
598.     AVDictionary *options = NULL;
599.     AVDictionaryEntry *e;
600.     int ret = 0;
         ^
601. 
602.     if (args && *args) {

libavfilter/avfilter.c:602:9: Taking true branch
600.     int ret = 0;
601. 
602.     if (args && *args) {
             ^
603.         if (!filter->filter->priv_class) {
604.             av_log(filter, AV_LOG_ERROR, "This filter does not take any "

libavfilter/avfilter.c:602:17: Taking true branch
600.     int ret = 0;
601. 
602.     if (args && *args) {
                     ^
603.         if (!filter->filter->priv_class) {
604.             av_log(filter, AV_LOG_ERROR, "This filter does not take any "

libavfilter/avfilter.c:603:14: Taking false branch
601. 
602.     if (args && *args) {
603.         if (!filter->filter->priv_class) {
                  ^
604.             av_log(filter, AV_LOG_ERROR, "This filter does not take any "
605.                    "options, but options were provided: %s.\n", args);

libavfilter/avfilter.c:610:14: Taking false branch
608. 
609. #if FF_API_OLD_FILTER_OPTS
610.         if (!strcmp(filter->filter->name, "scale") &&
                  ^
611.             strchr(args, ':') && strchr(args, ':') < strchr(args, '=')) {
612.             /* old w:h:flags=<flags> syntax */

libavfilter/avfilter.c:639:13: Taking false branch
637. #endif
638. 
639.         if (strchr(args, '=')) {
                 ^
640.             /* assume a list of key1=value1:key2=value2:... */
641.             ret = av_dict_parse_string(&options, args, "=", ":", 0);

libavfilter/avfilter.c:645:21: Taking false branch
643.                 goto fail;
644. #if FF_API_OLD_FILTER_OPTS
645.         } else if (!strcmp(filter->filter->name, "format")     ||
                         ^
646.                    !strcmp(filter->filter->name, "noformat")   ||
647.                    !strcmp(filter->filter->name, "frei0r")     ||

libavfilter/avfilter.c:646:21: Taking false branch
644. #if FF_API_OLD_FILTER_OPTS
645.         } else if (!strcmp(filter->filter->name, "format")     ||
646.                    !strcmp(filter->filter->name, "noformat")   ||
                         ^
647.                    !strcmp(filter->filter->name, "frei0r")     ||
648.                    !strcmp(filter->filter->name, "frei0r_src") ||

libavfilter/avfilter.c:647:21: Taking false branch
645.         } else if (!strcmp(filter->filter->name, "format")     ||
646.                    !strcmp(filter->filter->name, "noformat")   ||
647.                    !strcmp(filter->filter->name, "frei0r")     ||
                         ^
648.                    !strcmp(filter->filter->name, "frei0r_src") ||
649.                    !strcmp(filter->filter->name, "ocv")) {

libavfilter/avfilter.c:648:21: Taking false branch
646.                    !strcmp(filter->filter->name, "noformat")   ||
647.                    !strcmp(filter->filter->name, "frei0r")     ||
648.                    !strcmp(filter->filter->name, "frei0r_src") ||
                         ^
649.                    !strcmp(filter->filter->name, "ocv")) {
650.             /* a hack for compatibility with the old syntax

libavfilter/avfilter.c:649:21: Taking true branch
647.                    !strcmp(filter->filter->name, "frei0r")     ||
648.                    !strcmp(filter->filter->name, "frei0r_src") ||
649.                    !strcmp(filter->filter->name, "ocv")) {
                         ^
650.             /* a hack for compatibility with the old syntax
651.              * replace colons with |s */

libavfilter/avfilter.c:652:13: 
650.             /* a hack for compatibility with the old syntax
651.              * replace colons with |s */
652.             char *copy = av_strdup(args);
                 ^
653.             char *p    = copy;
654.             int nb_leading = 0; // number of leading colons to skip

libavutil/mem.c:219:1: start of procedure av_strdup()
  217. }
  218. 
  219. char *av_strdup(const char *s)
       ^
  220. {
  221.     char *ptr = NULL;

libavutil/mem.c:221:5: 
  219. char *av_strdup(const char *s)
  220. {
  221.     char *ptr = NULL;
           ^
  222.     if (s) {
  223.         int len = strlen(s) + 1;

libavutil/mem.c:222:9: Taking true branch
  220. {
  221.     char *ptr = NULL;
  222.     if (s) {
               ^
  223.         int len = strlen(s) + 1;
  224.         ptr = av_realloc(NULL, len);

libavutil/mem.c:223:9: 
  221.     char *ptr = NULL;
  222.     if (s) {
  223.         int len = strlen(s) + 1;
               ^
  224.         ptr = av_realloc(NULL, len);
  225.         if (ptr)

libavutil/mem.c:224:9: 
  222.     if (s) {
  223.         int len = strlen(s) + 1;
  224.         ptr = av_realloc(NULL, len);
               ^
  225.         if (ptr)
  226.             memcpy(ptr, s, len);

libavutil/mem.c:117:1: start of procedure av_realloc()
    115. }
    116. 
    117. void *av_realloc(void *ptr, size_t size)
         ^
    118. {
    119. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:124:9: Taking false branch
    122. 
    123.     /* let's disallow possibly ambiguous cases */
    124.     if (size > (INT_MAX - 16))
                 ^
    125.         return NULL;
    126. 

libavutil/mem.c:136:5: 
    134.     return _aligned_realloc(ptr, size, 32);
    135. #else
    136.     return realloc(ptr, size);
             ^
    137. #endif
    138. }

libavutil/mem.c:138:1: return from a call to av_realloc
    136.     return realloc(ptr, size);
    137. #endif
    138. }
         ^
    139. 
    140. int av_reallocp(void *ptr, size_t size)

libavutil/mem.c:225:13: Taking true branch
  223.         int len = strlen(s) + 1;
  224.         ptr = av_realloc(NULL, len);
  225.         if (ptr)
                   ^
  226.             memcpy(ptr, s, len);
  227.     }

libavutil/mem.c:226:13: 
  224.         ptr = av_realloc(NULL, len);
  225.         if (ptr)
  226.             memcpy(ptr, s, len);
                   ^
  227.     }
  228.     return ptr;

libavutil/mem.c:228:5: 
  226.             memcpy(ptr, s, len);
  227.     }
  228.     return ptr;
           ^
  229. }
  230. 

libavutil/mem.c:229:1: return from a call to av_strdup
  227.     }
  228.     return ptr;
  229. }
       ^
  230. 
  231. char *av_strndup(const char *s, size_t len)

libavfilter/avfilter.c:653:13: 
651.              * replace colons with |s */
652.             char *copy = av_strdup(args);
653.             char *p    = copy;
                 ^
654.             int nb_leading = 0; // number of leading colons to skip
655. 

libavfilter/avfilter.c:654:13: 
652.             char *copy = av_strdup(args);
653.             char *p    = copy;
654.             int nb_leading = 0; // number of leading colons to skip
                 ^
655. 
656.             if (!copy) {

libavfilter/avfilter.c:656:18: Taking false branch
654.             int nb_leading = 0; // number of leading colons to skip
655. 
656.             if (!copy) {
                      ^
657.                 ret = AVERROR(ENOMEM);
658.                 goto fail;

libavfilter/avfilter.c:661:18: Taking false branch
659.             }
660. 
661.             if (!strcmp(filter->filter->name, "frei0r") ||
                      ^
662.                 !strcmp(filter->filter->name, "ocv"))
663.                 nb_leading = 1;

libavfilter/avfilter.c:662:18: Taking false branch
660. 
661.             if (!strcmp(filter->filter->name, "frei0r") ||
662.                 !strcmp(filter->filter->name, "ocv"))
                      ^
663.                 nb_leading = 1;
664.             else if (!strcmp(filter->filter->name, "frei0r_src"))

libavfilter/avfilter.c:664:23: Taking false branch
662.                 !strcmp(filter->filter->name, "ocv"))
663.                 nb_leading = 1;
664.             else if (!strcmp(filter->filter->name, "frei0r_src"))
                           ^
665.                 nb_leading = 3;
666. 

libavfilter/avfilter.c:667:20: Loop condition is false. Leaving loop
665.                 nb_leading = 3;
666. 
667.             while (nb_leading--) {
                        ^
668.                 p = strchr(p, ':');
669.                 if (!p) {

libavfilter/avfilter.c:676:17: Taking true branch
674.             }
675. 
676.             if (strchr(p, ':')) {
                     ^
677.                 av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
678.                        "'|' to separate the list items.\n");

libavfilter/avfilter.c:677:17: Skipping av_log(): empty list of specs
675. 
676.             if (strchr(p, ':')) {
677.                 av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
                     ^
678.                        "'|' to separate the list items.\n");
679.             }

libavfilter/avfilter.c:681:21: Loop condition is false. Leaving loop
679.             }
680. 
681.             while ((p = strchr(p, ':')))
                         ^
682.                 *p++ = '|';
683. 

libavfilter/avfilter.c:684:13: Skipping process_unnamed_options(): empty list of specs
682.                 *p++ = '|';
683. 
684.             ret = process_unnamed_options(filter, &options, copy);
                 ^
685.             av_freep(&copy);
686. 

libavfilter/avfilter.c:685:13: Skipping av_freep(): empty list of specs
683. 
684.             ret = process_unnamed_options(filter, &options, copy);
685.             av_freep(&copy);
                 ^
686. 
687.             if (ret < 0)
