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

avconv.c:4068:1: start of procedure opt_preset()
4066. }
4067. 
4068. static int opt_preset(const char *opt, const char *arg)
      ^
4069. {
4070.     FILE *f=NULL;

avconv.c:4070:5: 
4068. static int opt_preset(const char *opt, const char *arg)
4069. {
4070.     FILE *f=NULL;
          ^
4071.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4072.     char *codec_name = *opt == 'v' ? video_codec_name :

avconv.c:4072:24: Condition is false
4070.     FILE *f=NULL;
4071.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4072.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4073.                        *opt == 'a' ? audio_codec_name :
4074.                                      subtitle_codec_name;

avconv.c:4073:24: Condition is false
4071.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4072.     char *codec_name = *opt == 'v' ? video_codec_name :
4073.                        *opt == 'a' ? audio_codec_name :
                             ^
4074.                                      subtitle_codec_name;
4075. 

avconv.c:4072:24: 
4070.     FILE *f=NULL;
4071.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4072.     char *codec_name = *opt == 'v' ? video_codec_name :
                             ^
4073.                        *opt == 'a' ? audio_codec_name :
4074.                                      subtitle_codec_name;

avconv.c:4072:5: 
4070.     FILE *f=NULL;
4071.     char filename[1000], tmp[1000], tmp2[1000], line[1000];
4072.     char *codec_name = *opt == 'v' ? video_codec_name :
          ^
4073.                        *opt == 'a' ? audio_codec_name :
4074.                                      subtitle_codec_name;

avconv.c:4076:64: Condition is false
4074.                                      subtitle_codec_name;
4075. 
4076.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
                                                                     ^
4077.         fprintf(stderr, "File for preset '%s' not found\n", arg);
4078.         exit_program(1);

avconv.c:4076:11: Taking true branch
4074.                                      subtitle_codec_name;
4075. 
4076.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
                ^
4077.         fprintf(stderr, "File for preset '%s' not found\n", arg);
4078.         exit_program(1);

avconv.c:4077:9: 
4075. 
4076.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4077.         fprintf(stderr, "File for preset '%s' not found\n", arg);
              ^
4078.         exit_program(1);
4079.     }

avconv.c:4078:9: Skipping exit_program(): empty list of specs
4076.     if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
4077.         fprintf(stderr, "File for preset '%s' not found\n", arg);
4078.         exit_program(1);
              ^
4079.     }
4080. 

avconv.c:4081:12: 
4079.     }
4080. 
4081.     while(!feof(f)){
                 ^
4082.         int e= fscanf(f, "%999[^\n]\n", line) - 1;
4083.         if(line[0] == '#' && !e)
