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

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

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

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

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

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

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

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

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

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

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

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