ffmpeg.c:2841: error: Null Dereference
  pointer `mid` last assigned on line 2841 could be null and is dereferenced at line 2841, column 5.

ffmpeg.c:2833:1: start of procedure opt_metadata()
2831. }
2832. 
2833. static int opt_metadata(const char *opt, const char *arg)
      ^
2834. {
2835.     char *mid= strchr(arg, '=');

ffmpeg.c:2835:5: 
2833. static int opt_metadata(const char *opt, const char *arg)
2834. {
2835.     char *mid= strchr(arg, '=');
          ^
2836. 
2837.     if(!mid){

ffmpeg.c:2837:9: Taking true branch
2835.     char *mid= strchr(arg, '=');
2836. 
2837.     if(!mid){
              ^
2838.         fprintf(stderr, "Missing =\n");
2839.         exit_program(1);

ffmpeg.c:2838:9: 
2836. 
2837.     if(!mid){
2838.         fprintf(stderr, "Missing =\n");
              ^
2839.         exit_program(1);
2840.     }

ffmpeg.c:2839:9: Skipping exit_program(): empty list of specs
2837.     if(!mid){
2838.         fprintf(stderr, "Missing =\n");
2839.         exit_program(1);
              ^
2840.     }
2841.     *mid++= 0;

ffmpeg.c:2841:5: 
2839.         exit_program(1);
2840.     }
2841.     *mid++= 0;
          ^
2842. 
2843.     av_dict_set(&metadata, arg, mid, 0);

static int opt_metadata(const char *opt, const char *arg)
{
    char *mid= strchr(arg, '=');
    if(!mid){
        fprintf(stderr, "Missing =\n");
        exit_program(1);
    }
    *mid++= 0;
    av_dict_set(&metadata, arg, mid, 0);
    return 0;
}
['static int opt_metadata(const char *opt, const char *arg)\n{\n    char *mid= strchr(arg, \'=\');\n    if(!mid){\n        fprintf(stderr, "Missing =\\n");\n        exit_program(1);\n    }\n    *mid++= 0;\n    av_dict_set(&metadata, arg, mid, 0);\n    return 0;\n}']