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:1085:1: start of procedure avcodec_encode_video2()
  1083. #endif
  1084. 
  1085. int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
        ^
  1086.                                               AVPacket *avpkt,
  1087.                                               const AVFrame *frame,

libavcodec/utils.c:1091:25: Condition is true
  1089. {
  1090.     int ret;
  1091.     int user_packet = !!avpkt->data;
                                ^
  1092. 
  1093.     if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) {

libavcodec/utils.c:1091:23: 
  1089. {
  1090.     int ret;
  1091.     int user_packet = !!avpkt->data;
                              ^
  1092. 
  1093.     if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) {

libavcodec/utils.c:1091:5: 
  1089. {
  1090.     int ret;
  1091.     int user_packet = !!avpkt->data;
            ^
  1092. 
  1093.     if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) {

libavcodec/utils.c:1093:11: Taking false branch
  1091.     int user_packet = !!avpkt->data;
  1092. 
  1093.     if (!(avctx->codec->capabilities & CODEC_CAP_DELAY) && !frame) {
                  ^
  1094.         av_init_packet(avpkt);
  1095.         avpkt->size     = 0;

libavcodec/utils.c:1100:9: 
  1098.     }
  1099. 
  1100.     if (av_image_check_size(avctx->width, avctx->height, 0, avctx))
                ^
  1101.         return AVERROR(EINVAL);
  1102. 

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:1100:9: Taking false branch
  1098.     }
  1099. 
  1100.     if (av_image_check_size(avctx->width, avctx->height, 0, avctx))
                ^
  1101.         return AVERROR(EINVAL);
  1102. 

libavcodec/utils.c:1103:5: Taking false branch
  1101.         return AVERROR(EINVAL);
  1102. 
  1103.     av_assert0(avctx->codec->encode2);
            ^
  1104. 
  1105.     *got_packet_ptr = 0;

libavcodec/utils.c:1103:5: Loop condition is false. Leaving loop
  1101.         return AVERROR(EINVAL);
  1102. 
  1103.     av_assert0(avctx->codec->encode2);
            ^
  1104. 
  1105.     *got_packet_ptr = 0;

libavcodec/utils.c:1105:5: 
  1103.     av_assert0(avctx->codec->encode2);
  1104. 
  1105.     *got_packet_ptr = 0;
            ^
  1106.     ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);
  1107.     if (!ret) {

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

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

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

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

libavcodec/utils.c:1114:10: Taking true branch
  1112.     }
  1113. 
  1114.     if (!ret)
                 ^
  1115.         avctx->frame_number++;
  1116. 

libavcodec/utils.c:1115:9: 
  1113. 
  1114.     if (!ret)
  1115.         avctx->frame_number++;
                ^
  1116. 
  1117.     emms_c();

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

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