avconv.c:1251: error: Null Dereference
  pointer `vstats_file` last assigned on line 1241 could be null and is dereferenced by call to `fprintf()` at line 1251, column 9.

avconv.c:1232:1: start of procedure do_video_stats()
1230. }
1231. 
1232. static void do_video_stats(AVFormatContext *os, OutputStream *ost,
      ^
1233.                            int frame_size)
1234. {

avconv.c:1240:10: Taking true branch
1238. 
1239.     /* this is executed just the first time do_video_stats is called */
1240.     if (!vstats_file) {
               ^
1241.         vstats_file = fopen(vstats_filename, "w");
1242.         if (!vstats_file) {

avconv.c:1241:9: 
1239.     /* this is executed just the first time do_video_stats is called */
1240.     if (!vstats_file) {
1241.         vstats_file = fopen(vstats_filename, "w");
              ^
1242.         if (!vstats_file) {
1243.             perror("fopen");

avconv.c:1242:14: Taking true branch
1240.     if (!vstats_file) {
1241.         vstats_file = fopen(vstats_filename, "w");
1242.         if (!vstats_file) {
                   ^
1243.             perror("fopen");
1244.             exit_program(1);

avconv.c:1243:13: 
1241.         vstats_file = fopen(vstats_filename, "w");
1242.         if (!vstats_file) {
1243.             perror("fopen");
                  ^
1244.             exit_program(1);
1245.         }

avconv.c:1244:13: Skipping exit_program(): empty list of specs
1242.         if (!vstats_file) {
1243.             perror("fopen");
1244.             exit_program(1);
                  ^
1245.         }
1246.     }

avconv.c:1248:5: 
1246.     }
1247. 
1248.     enc = ost->st->codec;
          ^
1249.     if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
1250.         frame_number = ost->frame_number;

avconv.c:1249:9: Taking true branch
1247. 
1248.     enc = ost->st->codec;
1249.     if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
              ^
1250.         frame_number = ost->frame_number;
1251.         fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA);

avconv.c:1250:9: 
1248.     enc = ost->st->codec;
1249.     if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
1250.         frame_number = ost->frame_number;
              ^
1251.         fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA);
1252.         if (enc->flags&CODEC_FLAG_PSNR)

avconv.c:1251:9: 
1249.     if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
1250.         frame_number = ost->frame_number;
1251.         fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA);
              ^
1252.         if (enc->flags&CODEC_FLAG_PSNR)
1253.             fprintf(vstats_file, "PSNR= %6.2f ", psnr(enc->coded_frame->error[0]/(enc->width*enc->height*255.0*255.0)));
