ffmpeg.c:4212: error: Null Dereference
  pointer `f` last assigned on line 4207 could be null and is dereferenced by call to `feof()` at line 4212, column 12.

ffmpeg.c:4199:1: start of procedure opt_preset()
4197. }
4198. 
4199. static int opt_preset(const char *opt, const char *arg)
      ^
4200. {
4201.     FILE *f=NULL;

ffmpeg.c:4201:5: 
4199. static int opt_preset(const char *opt, const char *arg)
4200. {
4201.     FILE *f=NULL;
          ^
4202.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4203.     char *codec_name = *opt == 'v' ? video_codec_name :

ffmpeg.c:4203:24: Condition is false
4201.     FILE *f=NULL;
4202.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4203.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4204.                        *opt == 'a' ? audio_codec_name :
4205.                                      subtitle_codec_name;

ffmpeg.c:4204:24: Condition is false
4202.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4203.     char *codec_name = *opt == 'v' ? video_codec_name :
4204.                        *opt == 'a' ? audio_codec_name :
                             ^
4205.                                      subtitle_codec_name;
4206. 

ffmpeg.c:4203:24: 
4201.     FILE *f=NULL;
4202.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4203.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4204.                        *opt == 'a' ? audio_codec_name :
4205.                                      subtitle_codec_name;

ffmpeg.c:4203:5: 
4201.     FILE *f=NULL;
4202.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4203.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4204.                        *opt == 'a' ? audio_codec_name :
4205.                                      subtitle_codec_name;

ffmpeg.c:4207:64: Condition is false
4205.                                      subtitle_codec_name;
4206. 
4207.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
                                                                     ^
4208.         fprintf(stderr, "File for preset '%s' not found\n", arg);
4209.         ffmpeg_exit(1);

ffmpeg.c:4207:11: Taking true branch
4205.                                      subtitle_codec_name;
4206. 
4207.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
                ^
4208.         fprintf(stderr, "File for preset '%s' not found\n", arg);
4209.         ffmpeg_exit(1);

ffmpeg.c:4208:9: 
4206. 
4207.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4208.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4209.         ffmpeg_exit(1);
4210.     }

ffmpeg.c:4209:9: Skipping ffmpeg_exit(): empty list of specs
4207.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4208.         fprintf(stderr, "File for preset '%s' not found\n", arg);
4209.         ffmpeg_exit(1);
              ^
4210.     }
4211. 

ffmpeg.c:4212:12: 
4210.     }
4211. 
4212.     while(!feof(f)){
                 ^
4213.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4214.         if(line[0] == '#' && !e)
