libavformat/rtpdec.c:358: error: Null Dereference
  pointer `infos->au_headers` last assigned on line 353 could be null and is dereferenced at line 358, column 5.

libavformat/rtpdec.c:322:1: start of procedure rtp_parse_mp4_au()
320. }
321. 
322. static int rtp_parse_mp4_au(RTPDemuxContext *s, const uint8_t *buf)
     ^
323. {
324.     int au_headers_length, au_header_size, i;

libavformat/rtpdec.c:328:5: 
326.     RTPPayloadData *infos;
327. 
328.     infos = s->rtp_payload_data;
         ^
329. 
330.     if (infos == NULL)

libavformat/rtpdec.c:330:9: Taking false branch
328.     infos = s->rtp_payload_data;
329. 
330.     if (infos == NULL)
             ^
331.         return -1;
332. 

libavformat/rtpdec.c:335:5: 
333.     /* decode the first 2 bytes where the AUHeader sections are stored
334.        length in bits */
335.     au_headers_length = AV_RB16(buf);
         ^
336. 
337.     if (au_headers_length > RTP_MAX_PACKET_LENGTH)

libavformat/rtpdec.c:337:9: Taking false branch
335.     au_headers_length = AV_RB16(buf);
336. 
337.     if (au_headers_length > RTP_MAX_PACKET_LENGTH)
             ^
338.       return -1;
339. 

libavformat/rtpdec.c:340:5: 
338.       return -1;
339. 
340.     infos->au_headers_length_bytes = (au_headers_length + 7) / 8;
         ^
341. 
342.     /* skip AU headers length section (2 bytes) */

libavformat/rtpdec.c:343:5: 
341. 
342.     /* skip AU headers length section (2 bytes) */
343.     buf += 2;
         ^
344. 
345.     init_get_bits(&getbitcontext, buf, infos->au_headers_length_bytes * 8);

libavformat/rtpdec.c:345:5: 
343.     buf += 2;
344. 
345.     init_get_bits(&getbitcontext, buf, infos->au_headers_length_bytes * 8);
         ^
346. 
347.     /* XXX: Wrong if optionnal additional sections are present (cts, dts etc...) */

libavcodec/bitstream.h:737:1: start of procedure init_get_bits()
  735.  * @param bit_size the size of the buffer in bits
  736.  */
  737. static inline void init_get_bits(GetBitContext *s,
       ^
  738.                    const uint8_t *buffer, int bit_size)
  739. {

libavcodec/bitstream.h:740:5: 
  738.                    const uint8_t *buffer, int bit_size)
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
           ^
  741.     if(buffer_size < 0 || bit_size < 0) {
  742.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:741:8: Taking false branch
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
  741.     if(buffer_size < 0 || bit_size < 0) {
              ^
  742.         buffer_size = bit_size = 0;
  743.         buffer = NULL;

libavcodec/bitstream.h:741:27: Taking false branch
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
  741.     if(buffer_size < 0 || bit_size < 0) {
                                 ^
  742.         buffer_size = bit_size = 0;
  743.         buffer = NULL;

libavcodec/bitstream.h:746:5: 
  744.     }
  745. 
  746.     s->buffer= buffer;
           ^
  747.     s->size_in_bits= bit_size;
  748.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:747:5: 
  745. 
  746.     s->buffer= buffer;
  747.     s->size_in_bits= bit_size;
           ^
  748.     s->buffer_end= buffer + buffer_size;
  749. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:748:5: 
  746.     s->buffer= buffer;
  747.     s->size_in_bits= bit_size;
  748.     s->buffer_end= buffer + buffer_size;
           ^
  749. #ifdef ALT_BITSTREAM_READER
  750.     s->index=0;

libavcodec/bitstream.h:750:5: 
  748.     s->buffer_end= buffer + buffer_size;
  749. #ifdef ALT_BITSTREAM_READER
  750.     s->index=0;
           ^
  751. #elif defined LIBMPEG2_BITSTREAM_READER
  752.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:760:1: return from a call to init_get_bits
  758.     skip_bits_long(s, 0);
  759. #endif
  760. }
       ^
  761. 
  762. static inline void align_get_bits(GetBitContext *s)

libavformat/rtpdec.c:348:5: 
346. 
347.     /* XXX: Wrong if optionnal additional sections are present (cts, dts etc...) */
348.     au_header_size = infos->sizelength + infos->indexlength;
         ^
349.     if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
350.         return -1;

libavformat/rtpdec.c:349:9: Taking false branch
347.     /* XXX: Wrong if optionnal additional sections are present (cts, dts etc...) */
348.     au_header_size = infos->sizelength + infos->indexlength;
349.     if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
             ^
350.         return -1;
351. 

libavformat/rtpdec.c:349:33: Taking false branch
347.     /* XXX: Wrong if optionnal additional sections are present (cts, dts etc...) */
348.     au_header_size = infos->sizelength + infos->indexlength;
349.     if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
                                     ^
350.         return -1;
351. 

libavformat/rtpdec.c:352:5: 
350.         return -1;
351. 
352.     infos->nb_au_headers = au_headers_length / au_header_size;
         ^
353.     infos->au_headers = av_malloc(sizeof(struct AUHeaders) * infos->nb_au_headers);
354. 

libavformat/rtpdec.c:353:5: 
351. 
352.     infos->nb_au_headers = au_headers_length / au_header_size;
353.     infos->au_headers = av_malloc(sizeof(struct AUHeaders) * infos->nb_au_headers);
         ^
354. 
355.     /* XXX: We handle multiple AU Section as only one (need to fix this for interleaving)

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:99:1: return from a call to av_malloc
   97. #endif
   98.     return ptr;
   99. }
       ^
  100. 
  101. void *av_realloc(void *ptr, unsigned int size)

libavformat/rtpdec.c:358:5: 
356.        In my test, the FAAD decoder does not behave correctly when sending each AU one by one
357.        but does when sending the whole as one big packet...  */
358.     infos->au_headers[0].size = 0;
         ^
359.     infos->au_headers[0].index = 0;
360.     for (i = 0; i < infos->nb_au_headers; ++i) {
