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

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

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

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

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

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

ffmpeg.c:2840:5: 
2838.         exit_program(1);
2839.     }
2840.     *mid++= 0;
          ^
2841. 
2842.     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}']