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

libavfilter/avfilter.c:615:1: start of procedure avfilter_init_str()
613. }
614. 
615. int avfilter_init_str(AVFilterContext *filter, const char *args)
     ^
616. {
617.     AVDictionary *options = NULL;

libavfilter/avfilter.c:617:5: 
615. int avfilter_init_str(AVFilterContext *filter, const char *args)
616. {
617.     AVDictionary *options = NULL;
         ^
618.     AVDictionaryEntry *e;
619.     int ret = 0;

libavfilter/avfilter.c:619:5: 
617.     AVDictionary *options = NULL;
618.     AVDictionaryEntry *e;
619.     int ret = 0;
         ^
620. 
621.     if (args && *args) {

libavfilter/avfilter.c:621:9: Taking true branch
619.     int ret = 0;
620. 
621.     if (args && *args) {
             ^
622.         if (!filter->filter->priv_class) {
623.             av_log(filter, AV_LOG_ERROR, "This filter does not take any "

libavfilter/avfilter.c:621:17: Taking true branch
619.     int ret = 0;
620. 
621.     if (args && *args) {
                     ^
622.         if (!filter->filter->priv_class) {
623.             av_log(filter, AV_LOG_ERROR, "This filter does not take any "

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

libavfilter/avfilter.c:629:14: Taking false branch
627. 
628. #if FF_API_OLD_FILTER_OPTS
629.         if (!strcmp(filter->filter->name, "scale") &&
                  ^
630.             strchr(args, ':') && strchr(args, ':') < strchr(args, '=')) {
631.             /* old w:h:flags=<flags> syntax */

libavfilter/avfilter.c:658:13: Taking false branch
656. #endif
657. 
658.         if (strchr(args, '=')) {
                 ^
659.             /* assume a list of key1=value1:key2=value2:... */
660.             ret = av_dict_parse_string(&options, args, "=", ":", 0);

libavfilter/avfilter.c:664:21: Taking false branch
662.                 goto fail;
663. #if FF_API_OLD_FILTER_OPTS
664.         } else if (!strcmp(filter->filter->name, "format")     ||
                         ^
665.                    !strcmp(filter->filter->name, "noformat")   ||
666.                    !strcmp(filter->filter->name, "frei0r")     ||

libavfilter/avfilter.c:665:21: Taking false branch
663. #if FF_API_OLD_FILTER_OPTS
664.         } else if (!strcmp(filter->filter->name, "format")     ||
665.                    !strcmp(filter->filter->name, "noformat")   ||
                         ^
666.                    !strcmp(filter->filter->name, "frei0r")     ||
667.                    !strcmp(filter->filter->name, "frei0r_src") ||

libavfilter/avfilter.c:666:21: Taking false branch
664.         } else if (!strcmp(filter->filter->name, "format")     ||
665.                    !strcmp(filter->filter->name, "noformat")   ||
666.                    !strcmp(filter->filter->name, "frei0r")     ||
                         ^
667.                    !strcmp(filter->filter->name, "frei0r_src") ||
668.                    !strcmp(filter->filter->name, "ocv")) {

libavfilter/avfilter.c:667:21: Taking false branch
665.                    !strcmp(filter->filter->name, "noformat")   ||
666.                    !strcmp(filter->filter->name, "frei0r")     ||
667.                    !strcmp(filter->filter->name, "frei0r_src") ||
                         ^
668.                    !strcmp(filter->filter->name, "ocv")) {
669.             /* a hack for compatibility with the old syntax

libavfilter/avfilter.c:668:21: Taking true branch
666.                    !strcmp(filter->filter->name, "frei0r")     ||
667.                    !strcmp(filter->filter->name, "frei0r_src") ||
668.                    !strcmp(filter->filter->name, "ocv")) {
                         ^
669.             /* a hack for compatibility with the old syntax
670.              * replace colons with |s */

libavfilter/avfilter.c:671:13: 
669.             /* a hack for compatibility with the old syntax
670.              * replace colons with |s */
671.             char *copy = av_strdup(args);
                 ^
672.             char *p    = copy;
673.             int nb_leading = 0; // number of leading colons to skip

libavutil/mem.c:196:1: start of procedure av_strdup()
  194. }
  195. 
  196. char *av_strdup(const char *s)
       ^
  197. {
  198.     char *ptr = NULL;

libavutil/mem.c:198:5: 
  196. char *av_strdup(const char *s)
  197. {
  198.     char *ptr = NULL;
           ^
  199.     if (s) {
  200.         int len = strlen(s) + 1;

libavutil/mem.c:199:9: Taking true branch
  197. {
  198.     char *ptr = NULL;
  199.     if (s) {
               ^
  200.         int len = strlen(s) + 1;
  201.         ptr = av_realloc(NULL, len);

libavutil/mem.c:200:9: 
  198.     char *ptr = NULL;
  199.     if (s) {
  200.         int len = strlen(s) + 1;
               ^
  201.         ptr = av_realloc(NULL, len);
  202.         if (ptr)

libavutil/mem.c:201:9: 
  199.     if (s) {
  200.         int len = strlen(s) + 1;
  201.         ptr = av_realloc(NULL, len);
               ^
  202.         if (ptr)
  203.             memcpy(ptr, s, len);

libavutil/mem.c:107:1: start of procedure av_realloc()
    105. }
    106. 
    107. void *av_realloc(void *ptr, size_t size)
         ^
    108. {
    109.     /* let's disallow possibly ambiguous cases */

libavutil/mem.c:110:9: Taking false branch
    108. {
    109.     /* let's disallow possibly ambiguous cases */
    110.     if (size > (INT_MAX - 16))
                 ^
    111.         return NULL;
    112. 

libavutil/mem.c:116:5: 
    114.     return _aligned_realloc(ptr, size, 32);
    115. #else
    116.     return realloc(ptr, size);
             ^
    117. #endif
    118. }

libavutil/mem.c:118:1: return from a call to av_realloc
    116.     return realloc(ptr, size);
    117. #endif
    118. }
         ^
    119. 
    120. int av_reallocp(void *ptr, size_t size)

libavutil/mem.c:202:13: Taking true branch
  200.         int len = strlen(s) + 1;
  201.         ptr = av_realloc(NULL, len);
  202.         if (ptr)
                   ^
  203.             memcpy(ptr, s, len);
  204.     }

libavutil/mem.c:203:13: 
  201.         ptr = av_realloc(NULL, len);
  202.         if (ptr)
  203.             memcpy(ptr, s, len);
                   ^
  204.     }
  205.     return ptr;

libavutil/mem.c:205:5: 
  203.             memcpy(ptr, s, len);
  204.     }
  205.     return ptr;
           ^
  206. }
  207. 

libavutil/mem.c:206:1: return from a call to av_strdup
  204.     }
  205.     return ptr;
  206. }
       ^
  207. 
  208. char *av_strndup(const char *s, size_t len)

libavfilter/avfilter.c:672:13: 
670.              * replace colons with |s */
671.             char *copy = av_strdup(args);
672.             char *p    = copy;
                 ^
673.             int nb_leading = 0; // number of leading colons to skip
674. 

libavfilter/avfilter.c:673:13: 
671.             char *copy = av_strdup(args);
672.             char *p    = copy;
673.             int nb_leading = 0; // number of leading colons to skip
                 ^
674. 
675.             if (!copy) {

libavfilter/avfilter.c:675:18: Taking false branch
673.             int nb_leading = 0; // number of leading colons to skip
674. 
675.             if (!copy) {
                      ^
676.                 ret = AVERROR(ENOMEM);
677.                 goto fail;

libavfilter/avfilter.c:680:18: Taking false branch
678.             }
679. 
680.             if (!strcmp(filter->filter->name, "frei0r") ||
                      ^
681.                 !strcmp(filter->filter->name, "ocv"))
682.                 nb_leading = 1;

libavfilter/avfilter.c:681:18: Taking false branch
679. 
680.             if (!strcmp(filter->filter->name, "frei0r") ||
681.                 !strcmp(filter->filter->name, "ocv"))
                      ^
682.                 nb_leading = 1;
683.             else if (!strcmp(filter->filter->name, "frei0r_src"))

libavfilter/avfilter.c:683:23: Taking false branch
681.                 !strcmp(filter->filter->name, "ocv"))
682.                 nb_leading = 1;
683.             else if (!strcmp(filter->filter->name, "frei0r_src"))
                           ^
684.                 nb_leading = 3;
685. 

libavfilter/avfilter.c:686:20: Loop condition is false. Leaving loop
684.                 nb_leading = 3;
685. 
686.             while (nb_leading--) {
                        ^
687.                 p = strchr(p, ':');
688.                 if (!p) {

libavfilter/avfilter.c:695:17: Taking true branch
693.             }
694. 
695.             if (strchr(p, ':')) {
                     ^
696.                 av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
697.                        "'|' to separate the list items.\n");

libavfilter/avfilter.c:696:17: Skipping av_log(): empty list of specs
694. 
695.             if (strchr(p, ':')) {
696.                 av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
                     ^
697.                        "'|' to separate the list items.\n");
698.             }

libavfilter/avfilter.c:700:21: Loop condition is false. Leaving loop
698.             }
699. 
700.             while ((p = strchr(p, ':')))
                         ^
701.                 *p++ = '|';
702. 

libavfilter/avfilter.c:703:13: Skipping process_unnamed_options(): empty list of specs
701.                 *p++ = '|';
702. 
703.             ret = process_unnamed_options(filter, &options, copy);
                 ^
704.             av_freep(&copy);
705. 

libavfilter/avfilter.c:704:13: Skipping av_freep(): empty list of specs
702. 
703.             ret = process_unnamed_options(filter, &options, copy);
704.             av_freep(&copy);
                 ^
705. 
706.             if (ret < 0)
