libavformat/matroskadec.c:839: error: Null Dereference
  pointer `matroska->packets` last assigned on line 836 could be null and is dereferenced at line 839, column 5.

libavformat/matroskadec.c:832:1: start of procedure matroska_queue_packet()
830.  */
831. 
832. static void
     ^
833. matroska_queue_packet (MatroskaDemuxContext *matroska,
834.                        AVPacket             *pkt)

libavformat/matroskadec.c:836:5: 
834.                        AVPacket             *pkt)
835. {
836.     matroska->packets =
         ^
837.         av_realloc(matroska->packets, (matroska->num_packets + 1) *
838.                    sizeof(AVPacket *));

libavutil/mem.c:94:1: start of procedure av_realloc()
  92. }
  93. 
  94. void *av_realloc(void *ptr, unsigned int size)
      ^
  95. {
  96. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:101:8: Taking false branch
   99. 
  100.     /* let's disallow possible ambiguous cases */
  101.     if(size > (INT_MAX-16) )
              ^
  102.         return NULL;
  103. 

libavutil/mem.c:110:5: 
  108.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
  109. #else
  110.     return realloc(ptr, size);
           ^
  111. #endif
  112. }

libavutil/mem.c:112:1: return from a call to av_realloc
  110.     return realloc(ptr, size);
  111. #endif
  112. }
       ^
  113. 
  114. void av_free(void *ptr)

libavformat/matroskadec.c:839:5: 
837.         av_realloc(matroska->packets, (matroska->num_packets + 1) *
838.                    sizeof(AVPacket *));
839.     matroska->packets[matroska->num_packets] = pkt;
         ^
840.     matroska->num_packets++;
841. }
