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

ffmpeg.c:4243:1: start of procedure opt_preset()
4241. }
4242. 
4243. static int opt_preset(const char *opt, const char *arg)
      ^
4244. {
4245.     FILE *f=NULL;

ffmpeg.c:4245:5: 
4243. static int opt_preset(const char *opt, const char *arg)
4244. {
4245.     FILE *f=NULL;
          ^
4246.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4247.     char *codec_name = *opt == 'v' ? video_codec_name :

ffmpeg.c:4247:24: Condition is false
4245.     FILE *f=NULL;
4246.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4247.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4248.                        *opt == 'a' ? audio_codec_name :
4249.                                      subtitle_codec_name;

ffmpeg.c:4248:24: Condition is false
4246.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4247.     char *codec_name = *opt == 'v' ? video_codec_name :
4248.                        *opt == 'a' ? audio_codec_name :
                             ^
4249.                                      subtitle_codec_name;
4250. 

ffmpeg.c:4247:24: 
4245.     FILE *f=NULL;
4246.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4247.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4248.                        *opt == 'a' ? audio_codec_name :
4249.                                      subtitle_codec_name;

ffmpeg.c:4247:5: 
4245.     FILE *f=NULL;
4246.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4247.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4248.                        *opt == 'a' ? audio_codec_name :
4249.                                      subtitle_codec_name;

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

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

ffmpeg.c:4252:9: 
4250. 
4251.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4252.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4253.         ffmpeg_exit(1);
4254.     }

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

ffmpeg.c:4256:12: 
4254.     }
4255. 
4256.     while(!feof(f)){
                 ^
4257.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4258.         if(line[0] == '#' && !e)
