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

libavformat/movenc.c:901:1: start of procedure mov_write_ctts_tag()
899. }
900. 
901. static int mov_write_ctts_tag(AVIOContext *pb, MOVTrack *track)
     ^
902. {
903.     MOVStts *ctts_entries;

libavformat/movenc.c:904:5: 
902. {
903.     MOVStts *ctts_entries;
904.     uint32_t entries = 0;
         ^
905.     uint32_t atom_size;
906.     int i;

libavformat/movenc.c:908:5: 
906.     int i;
907. 
908.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
         ^
909.     ctts_entries[0].count = 1;
910.     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: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)

libavformat/movenc.c:909:5: 
907. 
908.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
909.     ctts_entries[0].count = 1;
         ^
910.     ctts_entries[0].duration = track->cluster[0].cts;
911.     for (i=1; i<track->entry; i++) {
