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

ffmpeg.c:4214:1: start of procedure opt_preset()
4212. }
4213. 
4214. static int opt_preset(const char *opt, const char *arg)
      ^
4215. {
4216.     FILE *f=NULL;

ffmpeg.c:4216:5: 
4214. static int opt_preset(const char *opt, const char *arg)
4215. {
4216.     FILE *f=NULL;
          ^
4217.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4218.     char *codec_name = *opt == 'v' ? video_codec_name :

ffmpeg.c:4218:24: Condition is false
4216.     FILE *f=NULL;
4217.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4218.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4219.                        *opt == 'a' ? audio_codec_name :
4220.                                      subtitle_codec_name;

ffmpeg.c:4219:24: Condition is false
4217.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4218.     char *codec_name = *opt == 'v' ? video_codec_name :
4219.                        *opt == 'a' ? audio_codec_name :
                             ^
4220.                                      subtitle_codec_name;
4221. 

ffmpeg.c:4218:24: 
4216.     FILE *f=NULL;
4217.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4218.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4219.                        *opt == 'a' ? audio_codec_name :
4220.                                      subtitle_codec_name;

ffmpeg.c:4218:5: 
4216.     FILE *f=NULL;
4217.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4218.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4219.                        *opt == 'a' ? audio_codec_name :
4220.                                      subtitle_codec_name;

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

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

ffmpeg.c:4223:9: 
4221. 
4222.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4223.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4224.         ffmpeg_exit(1);
4225.     }

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

ffmpeg.c:4227:12: 
4225.     }
4226. 
4227.     while(!feof(f)){
                 ^
4228.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4229.         if(line[0] == '#' && !e)
