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

avconv.c:1302:1: start of procedure do_video_stats()
1300. }
1301. 
1302. static void do_video_stats(AVFormatContext *os, OutputStream *ost,
      ^
1303.                            int frame_size)
1304. {

avconv.c:1310:10: Taking true branch
1308. 
1309.     /* this is executed just the first time do_video_stats is called */
1310.     if (!vstats_file) {
               ^
1311.         vstats_file = fopen(vstats_filename, "w");
1312.         if (!vstats_file) {

avconv.c:1311:9: 
1309.     /* this is executed just the first time do_video_stats is called */
1310.     if (!vstats_file) {
1311.         vstats_file = fopen(vstats_filename, "w");
              ^
1312.         if (!vstats_file) {
1313.             perror("fopen");

avconv.c:1312:14: Taking true branch
1310.     if (!vstats_file) {
1311.         vstats_file = fopen(vstats_filename, "w");
1312.         if (!vstats_file) {
                   ^
1313.             perror("fopen");
1314.             exit_program(1);

avconv.c:1313:13: 
1311.         vstats_file = fopen(vstats_filename, "w");
1312.         if (!vstats_file) {
1313.             perror("fopen");
                  ^
1314.             exit_program(1);
1315.         }

avconv.c:1314:13: Skipping exit_program(): empty list of specs
1312.         if (!vstats_file) {
1313.             perror("fopen");
1314.             exit_program(1);
                  ^
1315.         }
1316.     }

avconv.c:1318:5: 
1316.     }
1317. 
1318.     enc = ost->st->codec;
          ^
1319.     if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
1320.         frame_number = ost->frame_number;

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

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

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