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

libavformat/movenc.c:822:1: start of procedure mov_write_ctts_tag()
820. }
821. 
822. static int mov_write_ctts_tag(ByteIOContext *pb, MOVTrack *track)
     ^
823. {
824.     MOVStts *ctts_entries;

libavformat/movenc.c:825:5: 
823. {
824.     MOVStts *ctts_entries;
825.     uint32_t entries = 0;
         ^
826.     uint32_t atom_size;
827.     int i;

libavformat/movenc.c:829:5: 
827.     int i;
828. 
829.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
         ^
830.     ctts_entries[0].count = 1;
831.     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:830:5: 
828. 
829.     ctts_entries = av_malloc((track->entry + 1) * sizeof(*ctts_entries)); /* worst case */
830.     ctts_entries[0].count = 1;
         ^
831.     ctts_entries[0].duration = track->cluster[0].cts;
832.     for (i=1; i<track->entry; i++) {
