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

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

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

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

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

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

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

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

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

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

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