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

ffmpeg.c:4113:1: start of procedure opt_preset()
4111. }
4112. 
4113. static int opt_preset(const char *opt, const char *arg)
      ^
4114. {
4115.     FILE *f=NULL;

ffmpeg.c:4115:5: 
4113. static int opt_preset(const char *opt, const char *arg)
4114. {
4115.     FILE *f=NULL;
          ^
4116.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4117.     char *codec_name = *opt == 'v' ? video_codec_name :

ffmpeg.c:4117:24: Condition is false
4115.     FILE *f=NULL;
4116.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4117.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4118.                        *opt == 'a' ? audio_codec_name :
4119.                                      subtitle_codec_name;

ffmpeg.c:4118:24: Condition is false
4116.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4117.     char *codec_name = *opt == 'v' ? video_codec_name :
4118.                        *opt == 'a' ? audio_codec_name :
                             ^
4119.                                      subtitle_codec_name;
4120. 

ffmpeg.c:4117:24: 
4115.     FILE *f=NULL;
4116.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4117.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4118.                        *opt == 'a' ? audio_codec_name :
4119.                                      subtitle_codec_name;

ffmpeg.c:4117:5: 
4115.     FILE *f=NULL;
4116.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4117.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4118.                        *opt == 'a' ? audio_codec_name :
4119.                                      subtitle_codec_name;

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

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

ffmpeg.c:4122:9: 
4120. 
4121.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4122.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4123.         ffmpeg_exit(1);
4124.     }

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

ffmpeg.c:4126:12: 
4124.     }
4125. 
4126.     while(!feof(f)){
                 ^
4127.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4128.         if(line[0] == '#' && !e)
