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

avconv.c:1223:1: start of procedure do_video_stats()
1221. }
1222. 
1223. static void do_video_stats(AVFormatContext *os, OutputStream *ost,
      ^
1224.                            int frame_size)
1225. {

avconv.c:1231:10: Taking true branch
1229. 
1230.     /* this is executed just the first time do_video_stats is called */
1231.     if (!vstats_file) {
               ^
1232.         vstats_file = fopen(vstats_filename, "w");
1233.         if (!vstats_file) {

avconv.c:1232:9: 
1230.     /* this is executed just the first time do_video_stats is called */
1231.     if (!vstats_file) {
1232.         vstats_file = fopen(vstats_filename, "w");
              ^
1233.         if (!vstats_file) {
1234.             perror("fopen");

avconv.c:1233:14: Taking true branch
1231.     if (!vstats_file) {
1232.         vstats_file = fopen(vstats_filename, "w");
1233.         if (!vstats_file) {
                   ^
1234.             perror("fopen");
1235.             exit_program(1);

avconv.c:1234:13: 
1232.         vstats_file = fopen(vstats_filename, "w");
1233.         if (!vstats_file) {
1234.             perror("fopen");
                  ^
1235.             exit_program(1);
1236.         }

avconv.c:1235:13: Skipping exit_program(): empty list of specs
1233.         if (!vstats_file) {
1234.             perror("fopen");
1235.             exit_program(1);
                  ^
1236.         }
1237.     }

avconv.c:1239:5: 
1237.     }
1238. 
1239.     enc = ost->st->codec;
          ^
1240.     if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
1241.         frame_number = ost->frame_number;

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

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

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