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

libavformat/movenc.c:755:1: start of procedure mov_write_ctts_tag()
753. }
754. 
755. static int mov_write_ctts_tag(ByteIOContext *pb, MOVTrack *track)
     ^
756. {
757.     MOVStts *ctts_entries;

libavformat/movenc.c:758:5: 
756. {
757.     MOVStts *ctts_entries;
758.     uint32_t entries = 0;
         ^
759.     uint32_t atom_size;
760.     int i;

libavformat/movenc.c:762:5: 
760.     int i;
761. 
762.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
         ^
763.     ctts_entries[0].count = 1;
764.     ctts_entries[0].duration = track->cluster[0].cts;

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking true branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:56:9: 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
  56.         return NULL;
              ^
  57. 
  58. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

libavformat/movenc.c:763:5: 
761. 
762.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
763.     ctts_entries[0].count = 1;
         ^
764.     ctts_entries[0].duration = track->cluster[0].cts;
765.     for (i=1; i<track->entry; i++) {
