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

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

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

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

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

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

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

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

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

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

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

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

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

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

libavfilter/avfilter.c:654:13: 
652.             /* a hack for compatibility with the old syntax
653.              * replace colons with |s */
654.             char *copy = av_strdup(args);
                 ^
655.             char *p    = copy;
656.             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:655:13: 
653.              * replace colons with |s */
654.             char *copy = av_strdup(args);
655.             char *p    = copy;
                 ^
656.             int nb_leading = 0; // number of leading colons to skip
657. 

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

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

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

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

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

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

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

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

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

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

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