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

libavformat/movenc.c:650:1: start of procedure mov_write_ctts_tag()
648. }
649. 
650. static int mov_write_ctts_tag(ByteIOContext *pb, MOVTrack* track)
     ^
651. {
652.     MOV_stts_t *ctts_entries;

libavformat/movenc.c:653:5: 
651. {
652.     MOV_stts_t *ctts_entries;
653.     uint32_t entries = 0;
         ^
654.     uint32_t atom_size;
655.     int i;

libavformat/movenc.c:657:5: 
655.     int i;
656. 
657.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
         ^
658.     ctts_entries[0].count = 1;
659.     ctts_entries[0].duration = track->cluster[0].cts;

libavutil/mem.c:42:1: start of procedure av_malloc()
  40.    linker will do it automatically */
  41. 
  42. void *av_malloc(unsigned int size)
      ^
  43. {
  44.     void *ptr;

libavutil/mem.c:50:8: Taking true branch
  48. 
  49.     /* let's disallow possible ambiguous cases */
  50.     if(size > (INT_MAX-16) )
             ^
  51.         return NULL;
  52. 

libavutil/mem.c:51:9: 
  49.     /* let's disallow possible ambiguous cases */
  50.     if(size > (INT_MAX-16) )
  51.         return NULL;
              ^
  52. 
  53. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:92:1: return from a call to av_malloc
  90. #endif
  91.     return ptr;
  92. }
      ^
  93. 
  94. void *av_realloc(void *ptr, unsigned int size)

libavformat/movenc.c:658:5: 
656. 
657.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
658.     ctts_entries[0].count = 1;
         ^
659.     ctts_entries[0].duration = track->cluster[0].cts;
660.     for (i=1; i<track->entry; i++) {
