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

ffmpeg.c:4092:1: start of procedure opt_preset()
4090. }
4091. 
4092. static int opt_preset(const char *opt, const char *arg)
      ^
4093. {
4094.     FILE *f=NULL;

ffmpeg.c:4094:5: 
4092. static int opt_preset(const char *opt, const char *arg)
4093. {
4094.     FILE *f=NULL;
          ^
4095.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4096.     char *codec_name = *opt == 'v' ? video_codec_name :

ffmpeg.c:4096:24: Condition is false
4094.     FILE *f=NULL;
4095.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4096.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4097.                        *opt == 'a' ? audio_codec_name :
4098.                                      subtitle_codec_name;

ffmpeg.c:4097:24: Condition is false
4095.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4096.     char *codec_name = *opt == 'v' ? video_codec_name :
4097.                        *opt == 'a' ? audio_codec_name :
                             ^
4098.                                      subtitle_codec_name;
4099. 

ffmpeg.c:4096:24: 
4094.     FILE *f=NULL;
4095.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4096.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4097.                        *opt == 'a' ? audio_codec_name :
4098.                                      subtitle_codec_name;

ffmpeg.c:4096:5: 
4094.     FILE *f=NULL;
4095.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4096.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4097.                        *opt == 'a' ? audio_codec_name :
4098.                                      subtitle_codec_name;

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

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

ffmpeg.c:4101:9: 
4099. 
4100.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4101.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4102.         ffmpeg_exit(1);
4103.     }

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

ffmpeg.c:4105:12: 
4103.     }
4104. 
4105.     while(!feof(f)){
                 ^
4106.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4107.         if(line[0] == '#' && !e)
