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

ffmpeg.c:4180:1: start of procedure opt_preset()
4178. }
4179. 
4180. static int opt_preset(const char *opt, const char *arg)
      ^
4181. {
4182.     FILE *f=NULL;

ffmpeg.c:4182:5: 
4180. static int opt_preset(const char *opt, const char *arg)
4181. {
4182.     FILE *f=NULL;
          ^
4183.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4184.     char *codec_name = *opt == 'v' ? video_codec_name :

ffmpeg.c:4184:24: Condition is false
4182.     FILE *f=NULL;
4183.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4184.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4185.                        *opt == 'a' ? audio_codec_name :
4186.                                      subtitle_codec_name;

ffmpeg.c:4185:24: Condition is false
4183.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4184.     char *codec_name = *opt == 'v' ? video_codec_name :
4185.                        *opt == 'a' ? audio_codec_name :
                             ^
4186.                                      subtitle_codec_name;
4187. 

ffmpeg.c:4184:24: 
4182.     FILE *f=NULL;
4183.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4184.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4185.                        *opt == 'a' ? audio_codec_name :
4186.                                      subtitle_codec_name;

ffmpeg.c:4184:5: 
4182.     FILE *f=NULL;
4183.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4184.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4185.                        *opt == 'a' ? audio_codec_name :
4186.                                      subtitle_codec_name;

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

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

ffmpeg.c:4189:9: 
4187. 
4188.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4189.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4190.         ffmpeg_exit(1);
4191.     }

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

ffmpeg.c:4193:12: 
4191.     }
4192. 
4193.     while(!feof(f)){
                 ^
4194.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4195.         if(line[0] == '#' && !e)
