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

ffmpeg.c:4195:1: start of procedure opt_preset()
4193. }
4194. 
4195. static int opt_preset(const char *opt, const char *arg)
      ^
4196. {
4197.     FILE *f=NULL;

ffmpeg.c:4197:5: 
4195. static int opt_preset(const char *opt, const char *arg)
4196. {
4197.     FILE *f=NULL;
          ^
4198.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4199.     char *codec_name = *opt == 'v' ? video_codec_name :

ffmpeg.c:4199:24: Condition is false
4197.     FILE *f=NULL;
4198.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4199.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4200.                        *opt == 'a' ? audio_codec_name :
4201.                                      subtitle_codec_name;

ffmpeg.c:4200:24: Condition is false
4198.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4199.     char *codec_name = *opt == 'v' ? video_codec_name :
4200.                        *opt == 'a' ? audio_codec_name :
                             ^
4201.                                      subtitle_codec_name;
4202. 

ffmpeg.c:4199:24: 
4197.     FILE *f=NULL;
4198.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4199.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4200.                        *opt == 'a' ? audio_codec_name :
4201.                                      subtitle_codec_name;

ffmpeg.c:4199:5: 
4197.     FILE *f=NULL;
4198.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4199.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4200.                        *opt == 'a' ? audio_codec_name :
4201.                                      subtitle_codec_name;

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

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

ffmpeg.c:4204:9: 
4202. 
4203.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4204.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4205.         ffmpeg_exit(1);
4206.     }

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

ffmpeg.c:4208:12: 
4206.     }
4207. 
4208.     while(!feof(f)){
                 ^
4209.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4210.         if(line[0] == '#' && !e)
