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

libavformat/movenc.c:1157:1: start of procedure mov_write_ctts_tag()
1155. }
1156. 
1157. static int mov_write_ctts_tag(AVIOContext *pb, MOVTrack *track)
      ^
1158. {
1159.     MOVStts *ctts_entries;

libavformat/movenc.c:1160:5: 
1158. {
1159.     MOVStts *ctts_entries;
1160.     uint32_t entries = 0;
          ^
1161.     uint32_t atom_size;
1162.     int i;

libavformat/movenc.c:1164:5: 
1162.     int i;
1163. 
1164.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
          ^
1165.     ctts_entries[0].count = 1;
1166.     ctts_entries[0].duration = track->cluster[0].cts;

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

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

libavutil/mem.c:70:9: Taking true branch
  68. 
  69.     /* let's disallow possibly ambiguous cases */
  70.     if (size > (INT_MAX - 32) || !size)
              ^
  71.         return NULL;
  72. 

libavutil/mem.c:71:9: 
  69.     /* let's disallow possibly ambiguous cases */
  70.     if (size > (INT_MAX - 32) || !size)
  71.         return NULL;
              ^
  72. 
  73. #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)

libavformat/movenc.c:1165:5: 
1163. 
1164.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
1165.     ctts_entries[0].count = 1;
          ^
1166.     ctts_entries[0].duration = track->cluster[0].cts;
1167.     for (i = 1; i < track->entry; i++) {
