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

ffmpeg.c:4102:1: start of procedure opt_preset()
4100. }
4101. 
4102. static int opt_preset(const char *opt, const char *arg)
      ^
4103. {
4104.     FILE *f=NULL;

ffmpeg.c:4104:5: 
4102. static int opt_preset(const char *opt, const char *arg)
4103. {
4104.     FILE *f=NULL;
          ^
4105.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4106.     char *codec_name = *opt == 'v' ? video_codec_name :

ffmpeg.c:4106:24: Condition is false
4104.     FILE *f=NULL;
4105.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4106.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4107.                        *opt == 'a' ? audio_codec_name :
4108.                                      subtitle_codec_name;

ffmpeg.c:4107:24: Condition is false
4105.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4106.     char *codec_name = *opt == 'v' ? video_codec_name :
4107.                        *opt == 'a' ? audio_codec_name :
                             ^
4108.                                      subtitle_codec_name;
4109. 

ffmpeg.c:4106:24: 
4104.     FILE *f=NULL;
4105.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4106.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4107.                        *opt == 'a' ? audio_codec_name :
4108.                                      subtitle_codec_name;

ffmpeg.c:4106:5: 
4104.     FILE *f=NULL;
4105.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4106.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4107.                        *opt == 'a' ? audio_codec_name :
4108.                                      subtitle_codec_name;

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

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

ffmpeg.c:4111:9: 
4109. 
4110.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4111.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4112.         ffmpeg_exit(1);
4113.     }

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

ffmpeg.c:4115:12: 
4113.     }
4114. 
4115.     while(!feof(f)){
                 ^
4116.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4117.         if(line[0] == '#' && !e)
