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

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

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

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

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

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

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

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

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

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

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

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