avconv.c:1709: error: Null Dereference
  pointer `null` is dereferenced by call to `avcodec_encode_video2()` at line 1709, column 23.

avconv.c:1656:1: start of procedure flush_encoders()
1654. }
1655. 
1656. static void flush_encoders(OutputStream *ost_table, int nb_ostreams)
      ^
1657. {
1658.     int i, ret;

avconv.c:1660:10: 
1658.     int i, ret;
1659. 
1660.     for (i = 0; i < nb_ostreams; i++) {
               ^
1661.         OutputStream   *ost = &ost_table[i];
1662.         AVCodecContext *enc = ost->st->codec;

avconv.c:1660:17: Loop condition is true. Entering loop body
1658.     int i, ret;
1659. 
1660.     for (i = 0; i < nb_ostreams; i++) {
                      ^
1661.         OutputStream   *ost = &ost_table[i];
1662.         AVCodecContext *enc = ost->st->codec;

avconv.c:1661:9: 
1659. 
1660.     for (i = 0; i < nb_ostreams; i++) {
1661.         OutputStream   *ost = &ost_table[i];
              ^
1662.         AVCodecContext *enc = ost->st->codec;
1663.         AVFormatContext *os = output_files[ost->file_index].ctx;

avconv.c:1662:9: 
1660.     for (i = 0; i < nb_ostreams; i++) {
1661.         OutputStream   *ost = &ost_table[i];
1662.         AVCodecContext *enc = ost->st->codec;
              ^
1663.         AVFormatContext *os = output_files[ost->file_index].ctx;
1664.         int stop_encoding = 0;

avconv.c:1663:9: 
1661.         OutputStream   *ost = &ost_table[i];
1662.         AVCodecContext *enc = ost->st->codec;
1663.         AVFormatContext *os = output_files[ost->file_index].ctx;
              ^
1664.         int stop_encoding = 0;
1665. 

avconv.c:1664:9: 
1662.         AVCodecContext *enc = ost->st->codec;
1663.         AVFormatContext *os = output_files[ost->file_index].ctx;
1664.         int stop_encoding = 0;
              ^
1665. 
1666.         if (!ost->encoding_needed)

avconv.c:1666:14: Taking false branch
1664.         int stop_encoding = 0;
1665. 
1666.         if (!ost->encoding_needed)
                   ^
1667.             continue;
1668. 

avconv.c:1669:13: Taking false branch
1667.             continue;
1668. 
1669.         if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1)
                  ^
1670.             continue;
1671.         if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == CODEC_ID_RAWVIDEO)

avconv.c:1671:13: Taking true branch
1669.         if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1)
1670.             continue;
1671.         if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == CODEC_ID_RAWVIDEO)
                  ^
1672.             continue;
1673. 

avconv.c:1671:66: Taking true branch
1669.         if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1)
1670.             continue;
1671.         if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == CODEC_ID_RAWVIDEO)
                                                                       ^
1672.             continue;
1673. 

avconv.c:1671:108: Taking false branch
1669.         if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1)
1670.             continue;
1671.         if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == CODEC_ID_RAWVIDEO)
                                                                                                                 ^
1672.             continue;
1673. 

avconv.c:1733:9: Loop condition is true. Entering loop body
1731.             if (stop_encoding)
1732.                 break;
1733.         }
              ^
1734.     }
1735. }

avconv.c:1677:13: 
1675.             AVPacket pkt;
1676.             int fifo_bytes, got_packet;
1677.             av_init_packet(&pkt);
                  ^
1678.             pkt.data = NULL;
1679.             pkt.size = 0;

libavcodec/avpacket.c:46:1: start of procedure av_init_packet()
  44. }
  45. 
  46. void av_init_packet(AVPacket *pkt)
      ^
  47. {
  48.     pkt->pts   = AV_NOPTS_VALUE;

libavcodec/avpacket.c:48:5: 
  46. void av_init_packet(AVPacket *pkt)
  47. {
  48.     pkt->pts   = AV_NOPTS_VALUE;
          ^
  49.     pkt->dts   = AV_NOPTS_VALUE;
  50.     pkt->pos   = -1;

libavcodec/avpacket.c:49:5: 
  47. {
  48.     pkt->pts   = AV_NOPTS_VALUE;
  49.     pkt->dts   = AV_NOPTS_VALUE;
          ^
  50.     pkt->pos   = -1;
  51.     pkt->duration = 0;

libavcodec/avpacket.c:50:5: 
  48.     pkt->pts   = AV_NOPTS_VALUE;
  49.     pkt->dts   = AV_NOPTS_VALUE;
  50.     pkt->pos   = -1;
          ^
  51.     pkt->duration = 0;
  52.     pkt->convergence_duration = 0;

libavcodec/avpacket.c:51:5: 
  49.     pkt->dts   = AV_NOPTS_VALUE;
  50.     pkt->pos   = -1;
  51.     pkt->duration = 0;
          ^
  52.     pkt->convergence_duration = 0;
  53.     pkt->flags = 0;

libavcodec/avpacket.c:52:5: 
  50.     pkt->pos   = -1;
  51.     pkt->duration = 0;
  52.     pkt->convergence_duration = 0;
          ^
  53.     pkt->flags = 0;
  54.     pkt->stream_index = 0;

libavcodec/avpacket.c:53:5: 
  51.     pkt->duration = 0;
  52.     pkt->convergence_duration = 0;
  53.     pkt->flags = 0;
          ^
  54.     pkt->stream_index = 0;
  55.     pkt->destruct= NULL;

libavcodec/avpacket.c:54:5: 
  52.     pkt->convergence_duration = 0;
  53.     pkt->flags = 0;
  54.     pkt->stream_index = 0;
          ^
  55.     pkt->destruct= NULL;
  56.     pkt->side_data       = NULL;

libavcodec/avpacket.c:55:5: 
  53.     pkt->flags = 0;
  54.     pkt->stream_index = 0;
  55.     pkt->destruct= NULL;
          ^
  56.     pkt->side_data       = NULL;
  57.     pkt->side_data_elems = 0;

libavcodec/avpacket.c:56:5: 
  54.     pkt->stream_index = 0;
  55.     pkt->destruct= NULL;
  56.     pkt->side_data       = NULL;
          ^
  57.     pkt->side_data_elems = 0;
  58. }

libavcodec/avpacket.c:57:5: 
  55.     pkt->destruct= NULL;
  56.     pkt->side_data       = NULL;
  57.     pkt->side_data_elems = 0;
          ^
  58. }
  59. 

libavcodec/avpacket.c:58:1: return from a call to av_init_packet
  56.     pkt->side_data       = NULL;
  57.     pkt->side_data_elems = 0;
  58. }
      ^
  59. 
  60. int av_new_packet(AVPacket *pkt, int size)

avconv.c:1678:13: 
1676.             int fifo_bytes, got_packet;
1677.             av_init_packet(&pkt);
1678.             pkt.data = NULL;
                  ^
1679.             pkt.size = 0;
1680. 

avconv.c:1679:13: 
1677.             av_init_packet(&pkt);
1678.             pkt.data = NULL;
1679.             pkt.size = 0;
                  ^
1680. 
1681.             switch (ost->st->codec->codec_type) {

avconv.c:1681:13: 
1679.             pkt.size = 0;
1680. 
1681.             switch (ost->st->codec->codec_type) {
                  ^
1682.             case AVMEDIA_TYPE_AUDIO:
1683.                 fifo_bytes = av_fifo_size(ost->fifo);

avconv.c:1682:13: Switch condition is false. Skipping switch case
1680. 
1681.             switch (ost->st->codec->codec_type) {
1682.             case AVMEDIA_TYPE_AUDIO:
                  ^
1683.                 fifo_bytes = av_fifo_size(ost->fifo);
1684.                 if (fifo_bytes > 0) {

avconv.c:1708:13: Switch condition is true. Entering switch case
1706.                 }
1707.                 break;
1708.             case AVMEDIA_TYPE_VIDEO:
                  ^
1709.                 ret = avcodec_encode_video2(enc, &pkt, NULL, &got_packet);
1710.                 if (ret < 0) {

avconv.c:1709:17: 
1707.                 break;
1708.             case AVMEDIA_TYPE_VIDEO:
1709.                 ret = avcodec_encode_video2(enc, &pkt, NULL, &got_packet);
                      ^
1710.                 if (ret < 0) {
1711.                     av_log(NULL, AV_LOG_FATAL, "Video encoding failed\n");

libavcodec/utils.c:1088:1: start of procedure avcodec_encode_video2()
  1086. #endif
  1087. 
  1088. int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
        ^
  1089.                                               AVPacket *avpkt,
  1090.                                               const AVFrame *frame,

libavcodec/utils.c:1094:25: Condition is true
  1092. {
  1093.     int ret;
  1094.     int user_packet = !!avpkt->data;
                                ^
  1095. 
  1096.     *got_packet_ptr = 0;

libavcodec/utils.c:1094:23: 
  1092. {
  1093.     int ret;
  1094.     int user_packet = !!avpkt->data;
                              ^
  1095. 
  1096.     *got_packet_ptr = 0;

libavcodec/utils.c:1094:5: 
  1092. {
  1093.     int ret;
  1094.     int user_packet = !!avpkt->data;
            ^
  1095. 
  1096.     *got_packet_ptr = 0;

libavcodec/utils.c:1096:5: 
  1094.     int user_packet = !!avpkt->data;
  1095. 
  1096.     *got_packet_ptr = 0;
            ^
  1097. 
  1098.     if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) {

libavcodec/utils.c:1098:11: Taking false branch
  1096.     *got_packet_ptr = 0;
  1097. 
  1098.     if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) {
                  ^
  1099.         av_init_packet(avpkt);
  1100.         avpkt->size     = 0;

libavcodec/utils.c:1104:9: 
  1102.     }
  1103. 
  1104.     if (av_image_check_size(avctx->width, avctx->height, 0, avctx))
                ^
  1105.         return AVERROR(EINVAL);
  1106. 

libavutil/imgutils.c:215:1: start of procedure av_image_check_size()
    213. static const AVClass imgutils_class = { "IMGUTILS", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, offsetof(ImgUtils, log_offset), offsetof(ImgUtils, log_ctx) };
    214. 
    215. int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
         ^
    216. {
    217.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };

libavutil/imgutils.c:217:5: 
    215. int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
    216. {
    217.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };
             ^
    218. 
    219.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)

libavutil/imgutils.c:219:9: Taking true branch
    217.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };
    218. 
    219.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
                 ^
    220.         return 0;
    221. 

libavutil/imgutils.c:219:21: Taking true branch
    217.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };
    218. 
    219.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
                             ^
    220.         return 0;
    221. 

libavutil/imgutils.c:219:33: Taking true branch
    217.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };
    218. 
    219.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
                                         ^
    220.         return 0;
    221. 

libavutil/imgutils.c:220:9: 
    218. 
    219.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
    220.         return 0;
                 ^
    221. 
    222.     av_log(&imgutils, AV_LOG_ERROR, "Picture size %ux%u is invalid\n", w, h);

libavutil/imgutils.c:224:1: return from a call to av_image_check_size
    222.     av_log(&imgutils, AV_LOG_ERROR, "Picture size %ux%u is invalid\n", w, h);
    223.     return AVERROR(EINVAL);
    224. }
         ^
    225. 
    226. void av_image_copy_plane(uint8_t       *dst, int dst_linesize,

libavcodec/utils.c:1104:9: Taking false branch
  1102.     }
  1103. 
  1104.     if (av_image_check_size(avctx->width, avctx->height, 0, avctx))
                ^
  1105.         return AVERROR(EINVAL);
  1106. 

libavcodec/utils.c:1107:5: Taking false branch
  1105.         return AVERROR(EINVAL);
  1106. 
  1107.     av_assert0(avctx->codec->encode2);
            ^
  1108. 
  1109.     ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);

libavcodec/utils.c:1107:5: Loop condition is false. Leaving loop
  1105.         return AVERROR(EINVAL);
  1106. 
  1107.     av_assert0(avctx->codec->encode2);
            ^
  1108. 
  1109.     ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);

libavcodec/utils.c:1109:5: Skipping __function_pointer__(): unresolved function pointer
  1107.     av_assert0(avctx->codec->encode2);
  1108. 
  1109.     ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);
            ^
  1110.     if (!ret) {
  1111.         if (!*got_packet_ptr)

libavcodec/utils.c:1110:10: Taking true branch
  1108. 
  1109.     ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);
  1110.     if (!ret) {
                 ^
  1111.         if (!*got_packet_ptr)
  1112.             avpkt->size = 0;

libavcodec/utils.c:1111:14: Taking false branch
  1109.     ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);
  1110.     if (!ret) {
  1111.         if (!*got_packet_ptr)
                     ^
  1112.             avpkt->size = 0;
  1113.         else if (!(avctx->codec->capabilities & CODEC_CAP_DELAY))

libavcodec/utils.c:1113:20: Taking false branch
  1111.         if (!*got_packet_ptr)
  1112.             avpkt->size = 0;
  1113.         else if (!(avctx->codec->capabilities & CODEC_CAP_DELAY))
                           ^
  1114.             avpkt->pts = avpkt->dts = frame->pts;
  1115. 

libavcodec/utils.c:1116:9: 
  1114.             avpkt->pts = avpkt->dts = frame->pts;
  1115. 
  1116.         avctx->frame_number++;
                ^
  1117.     }
  1118. 

libavcodec/utils.c:1120:5: 
  1118. 
  1119.     emms_c();
  1120.     return ret;
            ^
  1121. }
  1122. 

libavcodec/utils.c:1121:1: return from a call to avcodec_encode_video2
  1119.     emms_c();
  1120.     return ret;
  1121. }
        ^
  1122. 
  1123. int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
