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

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

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

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

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

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

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

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

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

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

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

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