libavformat/movenc.c:1083: error: Null Dereference
  pointer `ctts_entries` last assigned on line 1082 could be null and is dereferenced at line 1083, column 5.

libavformat/movenc.c:1075:1: start of procedure mov_write_ctts_tag()
1073. }
1074. 
1075. static int mov_write_ctts_tag(AVIOContext *pb, MOVTrack *track)
      ^
1076. {
1077.     MOVStts *ctts_entries;

libavformat/movenc.c:1078:5: 
1076. {
1077.     MOVStts *ctts_entries;
1078.     uint32_t entries = 0;
          ^
1079.     uint32_t atom_size;
1080.     int i;

libavformat/movenc.c:1082:5: 
1080.     int i;
1081. 
1082.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
          ^
1083.     ctts_entries[0].count = 1;
1084.     ctts_entries[0].duration = track->cluster[0].cts;

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:71:5: 
  69. #endif
  70. 
  71.     assert(size);
          ^
  72. 
  73.     /* let's disallow possible ambiguous cases */

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

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

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

libavformat/movenc.c:1083:5: 
1081. 
1082.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
1083.     ctts_entries[0].count = 1;
          ^
1084.     ctts_entries[0].duration = track->cluster[0].cts;
1085.     for (i=1; i<track->entry; i++) {
