libavformat/nutenc.c:624: error: Null Dereference
  pointer `nut->time_base` last assigned on line 588 could be null and is dereferenced at line 624, column 9.

libavformat/nutenc.c:579:1: start of procedure write_header()
577. }
578. 
579. static int write_header(AVFormatContext *s){
     ^
580.     NUTContext *nut = s->priv_data;
581.     AVIOContext *bc = s->pb;

libavformat/nutenc.c:580:5: 
578. 
579. static int write_header(AVFormatContext *s){
580.     NUTContext *nut = s->priv_data;
         ^
581.     AVIOContext *bc = s->pb;
582.     int i, j, ret;

libavformat/nutenc.c:581:5: 
579. static int write_header(AVFormatContext *s){
580.     NUTContext *nut = s->priv_data;
581.     AVIOContext *bc = s->pb;
         ^
582.     int i, j, ret;
583. 

libavformat/nutenc.c:584:5: 
582.     int i, j, ret;
583. 
584.     nut->avf= s;
         ^
585. 
586.     nut->stream   = av_mallocz(sizeof(StreamContext)*s->nb_streams);

libavformat/nutenc.c:586:5: 
584.     nut->avf= s;
585. 
586.     nut->stream   = av_mallocz(sizeof(StreamContext)*s->nb_streams);
         ^
587.     nut->chapter  = av_mallocz(sizeof(ChapterContext)*s->nb_chapters);
588.     nut->time_base= av_mallocz(sizeof(AVRational   )*(s->nb_streams +

libavutil/mem.c:154:1: start of procedure av_mallocz()
  152. }
  153. 
  154. void *av_mallocz(size_t size)
       ^
  155. {
  156.     void *ptr = av_malloc(size);

libavutil/mem.c:156:5: 
  154. void *av_mallocz(size_t size)
  155. {
  156.     void *ptr = av_malloc(size);
           ^
  157.     if (ptr)
  158.         memset(ptr, 0, size);

libavutil/mem.c:64:1: start of procedure av_malloc()
    62.    linker will do it automatically. */
    63. 
    64. void *av_malloc(size_t size)
        ^
    65. {
    66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
    64. void *av_malloc(size_t size)
    65. {
    66.     void *ptr = NULL;
            ^
    67. #if CONFIG_MEMALIGN_HACK
    68.     long diff;

libavutil/mem.c:72:8: Taking true branch
    70. 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-32) )
               ^
    73.         return NULL;
    74. 

libavutil/mem.c:73:9: 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-32) )
    73.         return NULL;
                ^
    74. 
    75. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:115:1: return from a call to av_malloc
    113. #endif
    114.     return ptr;
    115. }
         ^
    116. 
    117. void *av_realloc(void *ptr, size_t size)

libavutil/mem.c:157:9: Taking false branch
  155. {
  156.     void *ptr = av_malloc(size);
  157.     if (ptr)
               ^
  158.         memset(ptr, 0, size);
  159.     return ptr;

libavutil/mem.c:159:5: 
  157.     if (ptr)
  158.         memset(ptr, 0, size);
  159.     return ptr;
           ^
  160. }
  161. 

libavutil/mem.c:160:1: return from a call to av_mallocz
  158.         memset(ptr, 0, size);
  159.     return ptr;
  160. }
       ^
  161. 
  162. char *av_strdup(const char *s)

libavformat/nutenc.c:587:5: 
585. 
586.     nut->stream   = av_mallocz(sizeof(StreamContext)*s->nb_streams);
587.     nut->chapter  = av_mallocz(sizeof(ChapterContext)*s->nb_chapters);
         ^
588.     nut->time_base= av_mallocz(sizeof(AVRational   )*(s->nb_streams +
589.                                                       s->nb_chapters));

libavutil/mem.c:154:1: start of procedure av_mallocz()
  152. }
  153. 
  154. void *av_mallocz(size_t size)
       ^
  155. {
  156.     void *ptr = av_malloc(size);

libavutil/mem.c:156:5: 
  154. void *av_mallocz(size_t size)
  155. {
  156.     void *ptr = av_malloc(size);
           ^
  157.     if (ptr)
  158.         memset(ptr, 0, size);

libavutil/mem.c:64:1: start of procedure av_malloc()
    62.    linker will do it automatically. */
    63. 
    64. void *av_malloc(size_t size)
        ^
    65. {
    66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
    64. void *av_malloc(size_t size)
    65. {
    66.     void *ptr = NULL;
            ^
    67. #if CONFIG_MEMALIGN_HACK
    68.     long diff;

libavutil/mem.c:72:8: Taking true branch
    70. 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-32) )
               ^
    73.         return NULL;
    74. 

libavutil/mem.c:73:9: 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-32) )
    73.         return NULL;
                ^
    74. 
    75. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:115:1: return from a call to av_malloc
    113. #endif
    114.     return ptr;
    115. }
         ^
    116. 
    117. void *av_realloc(void *ptr, size_t size)

libavutil/mem.c:157:9: Taking false branch
  155. {
  156.     void *ptr = av_malloc(size);
  157.     if (ptr)
               ^
  158.         memset(ptr, 0, size);
  159.     return ptr;

libavutil/mem.c:159:5: 
  157.     if (ptr)
  158.         memset(ptr, 0, size);
  159.     return ptr;
           ^
  160. }
  161. 

libavutil/mem.c:160:1: return from a call to av_mallocz
  158.         memset(ptr, 0, size);
  159.     return ptr;
  160. }
       ^
  161. 
  162. char *av_strdup(const char *s)

libavformat/nutenc.c:588:5: 
586.     nut->stream   = av_mallocz(sizeof(StreamContext)*s->nb_streams);
587.     nut->chapter  = av_mallocz(sizeof(ChapterContext)*s->nb_chapters);
588.     nut->time_base= av_mallocz(sizeof(AVRational   )*(s->nb_streams +
         ^
589.                                                       s->nb_chapters));
590. 

libavutil/mem.c:154:1: start of procedure av_mallocz()
  152. }
  153. 
  154. void *av_mallocz(size_t size)
       ^
  155. {
  156.     void *ptr = av_malloc(size);

libavutil/mem.c:156:5: 
  154. void *av_mallocz(size_t size)
  155. {
  156.     void *ptr = av_malloc(size);
           ^
  157.     if (ptr)
  158.         memset(ptr, 0, size);

libavutil/mem.c:64:1: start of procedure av_malloc()
    62.    linker will do it automatically. */
    63. 
    64. void *av_malloc(size_t size)
        ^
    65. {
    66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
    64. void *av_malloc(size_t size)
    65. {
    66.     void *ptr = NULL;
            ^
    67. #if CONFIG_MEMALIGN_HACK
    68.     long diff;

libavutil/mem.c:72:8: Taking true branch
    70. 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-32) )
               ^
    73.         return NULL;
    74. 

libavutil/mem.c:73:9: 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-32) )
    73.         return NULL;
                ^
    74. 
    75. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:115:1: return from a call to av_malloc
    113. #endif
    114.     return ptr;
    115. }
         ^
    116. 
    117. void *av_realloc(void *ptr, size_t size)

libavutil/mem.c:157:9: Taking false branch
  155. {
  156.     void *ptr = av_malloc(size);
  157.     if (ptr)
               ^
  158.         memset(ptr, 0, size);
  159.     return ptr;

libavutil/mem.c:159:5: 
  157.     if (ptr)
  158.         memset(ptr, 0, size);
  159.     return ptr;
           ^
  160. }
  161. 

libavutil/mem.c:160:1: return from a call to av_mallocz
  158.         memset(ptr, 0, size);
  159.     return ptr;
  160. }
       ^
  161. 
  162. char *av_strdup(const char *s)

libavformat/nutenc.c:591:9: 
589.                                                       s->nb_chapters));
590. 
591.     for(i=0; i<s->nb_streams; i++){
             ^
592.         AVStream *st= s->streams[i];
593.         int ssize;

libavformat/nutenc.c:591:14: Loop condition is false. Leaving loop
589.                                                       s->nb_chapters));
590. 
591.     for(i=0; i<s->nb_streams; i++){
                  ^
592.         AVStream *st= s->streams[i];
593.         int ssize;

libavformat/nutenc.c:616:10: 
614.     }
615. 
616.     for (i = 0; i < s->nb_chapters; i++) {
              ^
617.         AVChapter *ch = s->chapters[i];
618. 

libavformat/nutenc.c:616:17: Loop condition is true. Entering loop body
614.     }
615. 
616.     for (i = 0; i < s->nb_chapters; i++) {
                     ^
617.         AVChapter *ch = s->chapters[i];
618. 

libavformat/nutenc.c:617:9: 
615. 
616.     for (i = 0; i < s->nb_chapters; i++) {
617.         AVChapter *ch = s->chapters[i];
             ^
618. 
619.         for (j = 0; j < nut->time_base_count; j++) {

libavformat/nutenc.c:619:14: 
617.         AVChapter *ch = s->chapters[i];
618. 
619.         for (j = 0; j < nut->time_base_count; j++) {
                  ^
620.             if (!memcmp(&ch->time_base, &nut->time_base[j], sizeof(AVRational)))
621.                 break;

libavformat/nutenc.c:619:21: Loop condition is false. Leaving loop
617.         AVChapter *ch = s->chapters[i];
618. 
619.         for (j = 0; j < nut->time_base_count; j++) {
                         ^
620.             if (!memcmp(&ch->time_base, &nut->time_base[j], sizeof(AVRational)))
621.                 break;

libavformat/nutenc.c:624:9: 
622.         }
623. 
624.         nut->time_base[j] = ch->time_base;
             ^
625.         nut->chapter[i].time_base = &nut->time_base[j];
626.         if(j == nut->time_base_count)
