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

ffmpeg.c:4232:1: start of procedure opt_preset()
4230. }
4231. 
4232. static int opt_preset(const char *opt, const char *arg)
      ^
4233. {
4234.     FILE *f=NULL;

ffmpeg.c:4234:5: 
4232. static int opt_preset(const char *opt, const char *arg)
4233. {
4234.     FILE *f=NULL;
          ^
4235.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4236.     char *codec_name = *opt == 'v' ? video_codec_name :

ffmpeg.c:4236:24: Condition is false
4234.     FILE *f=NULL;
4235.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4236.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4237.                        *opt == 'a' ? audio_codec_name :
4238.                                      subtitle_codec_name;

ffmpeg.c:4237:24: Condition is false
4235.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4236.     char *codec_name = *opt == 'v' ? video_codec_name :
4237.                        *opt == 'a' ? audio_codec_name :
                             ^
4238.                                      subtitle_codec_name;
4239. 

ffmpeg.c:4236:24: 
4234.     FILE *f=NULL;
4235.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4236.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4237.                        *opt == 'a' ? audio_codec_name :
4238.                                      subtitle_codec_name;

ffmpeg.c:4236:5: 
4234.     FILE *f=NULL;
4235.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4236.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4237.                        *opt == 'a' ? audio_codec_name :
4238.                                      subtitle_codec_name;

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

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

ffmpeg.c:4241:9: 
4239. 
4240.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4241.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4242.         ffmpeg_exit(1);
4243.     }

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

ffmpeg.c:4245:12: 
4243.     }
4244. 
4245.     while(!feof(f)){
                 ^
4246.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4247.         if(line[0] == '#' && !e)
