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

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

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

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

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

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

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

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

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

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

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

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