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

ffmpeg.c:2820:1: start of procedure opt_metadata()
2818. }
2819. 
2820. static int opt_metadata(const char *opt, const char *arg)
      ^
2821. {
2822.     char *mid= strchr(arg, '=');

ffmpeg.c:2822:5: 
2820. static int opt_metadata(const char *opt, const char *arg)
2821. {
2822.     char *mid= strchr(arg, '=');
          ^
2823. 
2824.     if(!mid){

ffmpeg.c:2824:9: Taking true branch
2822.     char *mid= strchr(arg, '=');
2823. 
2824.     if(!mid){
              ^
2825.         fprintf(stderr, "Missing =\n");
2826.         ffmpeg_exit(1);

ffmpeg.c:2825:9: 
2823. 
2824.     if(!mid){
2825.         fprintf(stderr, "Missing =\n");
              ^
2826.         ffmpeg_exit(1);
2827.     }

ffmpeg.c:2826:9: Skipping ffmpeg_exit(): empty list of specs
2824.     if(!mid){
2825.         fprintf(stderr, "Missing =\n");
2826.         ffmpeg_exit(1);
              ^
2827.     }
2828.     *mid++= 0;

ffmpeg.c:2828:5: 
2826.         ffmpeg_exit(1);
2827.     }
2828.     *mid++= 0;
          ^
2829. 
2830.     av_metadata_set2(&metadata, arg, mid, 0);

static int opt_metadata(const char *opt, const char *arg)
{
    char *mid= strchr(arg, '=');
    if(!mid){
        fprintf(stderr, "Missing =\n");
        ffmpeg_exit(1);
    }
    *mid++= 0;
    av_metadata_set2(&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        ffmpeg_exit(1);\n    }\n    *mid++= 0;\n    av_metadata_set2(&metadata, arg, mid, 0);\n    return 0;\n}']