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

avconv.c:1287:1: start of procedure do_video_stats()
1285. }
1286. 
1287. static void do_video_stats(AVFormatContext *os, OutputStream *ost,
      ^
1288.                            int frame_size)
1289. {

avconv.c:1295:10: Taking true branch
1293. 
1294.     /* this is executed just the first time do_video_stats is called */
1295.     if (!vstats_file) {
               ^
1296.         vstats_file = fopen(vstats_filename, "w");
1297.         if (!vstats_file) {

avconv.c:1296:9: 
1294.     /* this is executed just the first time do_video_stats is called */
1295.     if (!vstats_file) {
1296.         vstats_file = fopen(vstats_filename, "w");
              ^
1297.         if (!vstats_file) {
1298.             perror("fopen");

avconv.c:1297:14: Taking true branch
1295.     if (!vstats_file) {
1296.         vstats_file = fopen(vstats_filename, "w");
1297.         if (!vstats_file) {
                   ^
1298.             perror("fopen");
1299.             exit_program(1);

avconv.c:1298:13: 
1296.         vstats_file = fopen(vstats_filename, "w");
1297.         if (!vstats_file) {
1298.             perror("fopen");
                  ^
1299.             exit_program(1);
1300.         }

avconv.c:1299:13: Skipping exit_program(): empty list of specs
1297.         if (!vstats_file) {
1298.             perror("fopen");
1299.             exit_program(1);
                  ^
1300.         }
1301.     }

avconv.c:1303:5: 
1301.     }
1302. 
1303.     enc = ost->st->codec;
          ^
1304.     if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
1305.         frame_number = ost->frame_number;

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

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

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