libavformat/oggparseflac.c:65: error: Null Dereference
  pointer `st->codec->extradata` last assigned on line 63 could be null and is dereferenced by call to `memcpy()` at line 65, column 9.

libavformat/oggparseflac.c:29:1: start of procedure flac_header()
27. #define OGG_FLAC_METADATA_TYPE_STREAMINFO 0x7F
28. 
29. static int
    ^
30. flac_header (AVFormatContext * s, int idx)
31. {

libavformat/oggparseflac.c:32:5: 
30. flac_header (AVFormatContext * s, int idx)
31. {
32.     struct ogg *ogg = s->priv_data;
        ^
33.     struct ogg_stream *os = ogg->streams + idx;
34.     AVStream *st = s->streams[idx];

libavformat/oggparseflac.c:33:5: 
31. {
32.     struct ogg *ogg = s->priv_data;
33.     struct ogg_stream *os = ogg->streams + idx;
        ^
34.     AVStream *st = s->streams[idx];
35.     GetBitContext gb;

libavformat/oggparseflac.c:34:5: 
32.     struct ogg *ogg = s->priv_data;
33.     struct ogg_stream *os = ogg->streams + idx;
34.     AVStream *st = s->streams[idx];
        ^
35.     GetBitContext gb;
36.     FLACStreaminfo si;

libavformat/oggparseflac.c:39:9: Taking false branch
37.     int mdt;
38. 
39.     if (os->buf[os->pstart] == 0xff)
            ^
40.         return 0;
41. 

libavformat/oggparseflac.c:42:5: 
40.         return 0;
41. 
42.     init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
        ^
43.     skip_bits1(&gb); /* metadata_last */
44.     mdt = get_bits(&gb, 7);

libavcodec/get_bits.h:473:1: start of procedure init_get_bits()
  471.  * responsible for checking for the buffer end yourself (take advantage of the padding)!
  472.  */
  473. static inline void init_get_bits(GetBitContext *s,
       ^
  474.                    const uint8_t *buffer, int bit_size)
  475. {

libavcodec/get_bits.h:476:5: 
  474.                    const uint8_t *buffer, int bit_size)
  475. {
  476.     int buffer_size= (bit_size+7)>>3;
           ^
  477.     if(buffer_size < 0 || bit_size < 0) {
  478.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:477:8: Taking false branch
  475. {
  476.     int buffer_size= (bit_size+7)>>3;
  477.     if(buffer_size < 0 || bit_size < 0) {
              ^
  478.         buffer_size = bit_size = 0;
  479.         buffer = NULL;

libavcodec/get_bits.h:477:27: Taking false branch
  475. {
  476.     int buffer_size= (bit_size+7)>>3;
  477.     if(buffer_size < 0 || bit_size < 0) {
                                 ^
  478.         buffer_size = bit_size = 0;
  479.         buffer = NULL;

libavcodec/get_bits.h:482:5: 
  480.     }
  481. 
  482.     s->buffer= buffer;
           ^
  483.     s->size_in_bits= bit_size;
  484.     s->buffer_end= buffer + buffer_size;

libavcodec/get_bits.h:483:5: 
  481. 
  482.     s->buffer= buffer;
  483.     s->size_in_bits= bit_size;
           ^
  484.     s->buffer_end= buffer + buffer_size;
  485. #ifdef ALT_BITSTREAM_READER

libavcodec/get_bits.h:484:5: 
  482.     s->buffer= buffer;
  483.     s->size_in_bits= bit_size;
  484.     s->buffer_end= buffer + buffer_size;
           ^
  485. #ifdef ALT_BITSTREAM_READER
  486.     s->index=0;

libavcodec/get_bits.h:486:5: 
  484.     s->buffer_end= buffer + buffer_size;
  485. #ifdef ALT_BITSTREAM_READER
  486.     s->index=0;
           ^
  487. #elif defined LIBMPEG2_BITSTREAM_READER
  488.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/get_bits.h:496:1: return from a call to init_get_bits
  494.     skip_bits_long(s, 0);
  495. #endif
  496. }
       ^
  497. 
  498. static inline void align_get_bits(GetBitContext *s)

libavformat/oggparseflac.c:43:5: 
41. 
42.     init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
43.     skip_bits1(&gb); /* metadata_last */
        ^
44.     mdt = get_bits(&gb, 7);
45. 

libavcodec/get_bits.h:417:1: start of procedure skip_bits1()
  415. }
  416. 
  417. static inline void skip_bits1(GetBitContext *s){
       ^
  418.     skip_bits(s, 1);
  419. }

libavcodec/get_bits.h:418:5: 
  416. 
  417. static inline void skip_bits1(GetBitContext *s){
  418.     skip_bits(s, 1);
           ^
  419. }
  420. 

libavcodec/get_bits.h:385:1: start of procedure skip_bits()
    383. }
    384. 
    385. static inline void skip_bits(GetBitContext *s, int n){
         ^
    386.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
    387.     OPEN_READER(re, s)

libavcodec/get_bits.h:387:5: 
    385. static inline void skip_bits(GetBitContext *s, int n){
    386.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
    387.     OPEN_READER(re, s)
             ^
    388.     UPDATE_CACHE(re, s)
    389.     LAST_SKIP_BITS(re, s, n)

libavcodec/get_bits.h:388:5: 
    386.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
    387.     OPEN_READER(re, s)
    388.     UPDATE_CACHE(re, s)
             ^
    389.     LAST_SKIP_BITS(re, s, n)
    390.     CLOSE_READER(re, s)

libavutil/bswap.h:54:1: start of procedure bswap_32()
      52. 
      53. #ifndef bswap_32
      54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
          ^
      55. {
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);

libavutil/bswap.h:56:5: 
      54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
      55. {
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
              ^
      57.     x= (x>>16) | (x<<16);
      58.     return x;

libavutil/bswap.h:57:5: 
      55. {
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
      57.     x= (x>>16) | (x<<16);
              ^
      58.     return x;
      59. }

libavutil/bswap.h:58:5: 
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
      57.     x= (x>>16) | (x<<16);
      58.     return x;
              ^
      59. }
      60. #endif

libavutil/bswap.h:59:1: return from a call to bswap_32
      57.     x= (x>>16) | (x<<16);
      58.     return x;
      59. }
          ^
      60. #endif
      61. 

libavcodec/get_bits.h:389:5: 
    387.     OPEN_READER(re, s)
    388.     UPDATE_CACHE(re, s)
    389.     LAST_SKIP_BITS(re, s, n)
             ^
    390.     CLOSE_READER(re, s)
    391. }

libavcodec/get_bits.h:390:5: 
    388.     UPDATE_CACHE(re, s)
    389.     LAST_SKIP_BITS(re, s, n)
    390.     CLOSE_READER(re, s)
             ^
    391. }
    392. 

libavcodec/get_bits.h:391:1: return from a call to skip_bits
    389.     LAST_SKIP_BITS(re, s, n)
    390.     CLOSE_READER(re, s)
    391. }
         ^
    392. 
    393. static inline unsigned int get_bits1(GetBitContext *s){

libavcodec/get_bits.h:419:1: return from a call to skip_bits1
  417. static inline void skip_bits1(GetBitContext *s){
  418.     skip_bits(s, 1);
  419. }
       ^
  420. 
  421. /**

libavformat/oggparseflac.c:44:5: 
42.     init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
43.     skip_bits1(&gb); /* metadata_last */
44.     mdt = get_bits(&gb, 7);
        ^
45. 
46.     if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {

libavcodec/get_bits.h:362:1: start of procedure get_bits()
  360.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
  361.  */
  362. static inline unsigned int get_bits(GetBitContext *s, int n){
       ^
  363.     register int tmp;
  364.     OPEN_READER(re, s)

libavcodec/get_bits.h:364:5: 
  362. static inline unsigned int get_bits(GetBitContext *s, int n){
  363.     register int tmp;
  364.     OPEN_READER(re, s)
           ^
  365.     UPDATE_CACHE(re, s)
  366.     tmp= SHOW_UBITS(re, s, n);

libavcodec/get_bits.h:365:5: 
  363.     register int tmp;
  364.     OPEN_READER(re, s)
  365.     UPDATE_CACHE(re, s)
           ^
  366.     tmp= SHOW_UBITS(re, s, n);
  367.     LAST_SKIP_BITS(re, s, n)

libavutil/bswap.h:54:1: start of procedure bswap_32()
    52. 
    53. #ifndef bswap_32
    54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
        ^
    55. {
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);

libavutil/bswap.h:56:5: 
    54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
    55. {
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
            ^
    57.     x= (x>>16) | (x<<16);
    58.     return x;

libavutil/bswap.h:57:5: 
    55. {
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
    57.     x= (x>>16) | (x<<16);
            ^
    58.     return x;
    59. }

libavutil/bswap.h:58:5: 
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
    57.     x= (x>>16) | (x<<16);
    58.     return x;
            ^
    59. }
    60. #endif

libavutil/bswap.h:59:1: return from a call to bswap_32
    57.     x= (x>>16) | (x<<16);
    58.     return x;
    59. }
        ^
    60. #endif
    61. 

libavcodec/get_bits.h:366:5: 
  364.     OPEN_READER(re, s)
  365.     UPDATE_CACHE(re, s)
  366.     tmp= SHOW_UBITS(re, s, n);
           ^
  367.     LAST_SKIP_BITS(re, s, n)
  368.     CLOSE_READER(re, s)

libavcodec/get_bits.h:367:5: 
  365.     UPDATE_CACHE(re, s)
  366.     tmp= SHOW_UBITS(re, s, n);
  367.     LAST_SKIP_BITS(re, s, n)
           ^
  368.     CLOSE_READER(re, s)
  369.     return tmp;

libavcodec/get_bits.h:368:5: 
  366.     tmp= SHOW_UBITS(re, s, n);
  367.     LAST_SKIP_BITS(re, s, n)
  368.     CLOSE_READER(re, s)
           ^
  369.     return tmp;
  370. }

libavcodec/get_bits.h:369:5: 
  367.     LAST_SKIP_BITS(re, s, n)
  368.     CLOSE_READER(re, s)
  369.     return tmp;
           ^
  370. }
  371. 

libavcodec/get_bits.h:370:1: return from a call to get_bits
  368.     CLOSE_READER(re, s)
  369.     return tmp;
  370. }
       ^
  371. 
  372. /**

libavformat/oggparseflac.c:46:9: Taking true branch
44.     mdt = get_bits(&gb, 7);
45. 
46.     if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {
            ^
47.         uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;
48.         skip_bits_long(&gb, 4*8); /* "FLAC" */

libavformat/oggparseflac.c:47:9: 
45. 
46.     if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {
47.         uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;
            ^
48.         skip_bits_long(&gb, 4*8); /* "FLAC" */
49.         if(get_bits(&gb, 8) != 1) /* unsupported major version */

libavformat/oggparseflac.c:48:9: 
46.     if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {
47.         uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;
48.         skip_bits_long(&gb, 4*8); /* "FLAC" */
            ^
49.         if(get_bits(&gb, 8) != 1) /* unsupported major version */
50.             return -1;

libavcodec/get_bits.h:188:1: start of procedure skip_bits_long()
  186. }
  187. 
  188. static inline void skip_bits_long(GetBitContext *s, int n){
       ^
  189.     s->index += n;
  190. }

libavcodec/get_bits.h:189:5: 
  187. 
  188. static inline void skip_bits_long(GetBitContext *s, int n){
  189.     s->index += n;
           ^
  190. }
  191. 

libavcodec/get_bits.h:190:1: return from a call to skip_bits_long
  188. static inline void skip_bits_long(GetBitContext *s, int n){
  189.     s->index += n;
  190. }
       ^
  191. 
  192. #elif defined LIBMPEG2_BITSTREAM_READER

libavformat/oggparseflac.c:49:12: 
47.         uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;
48.         skip_bits_long(&gb, 4*8); /* "FLAC" */
49.         if(get_bits(&gb, 8) != 1) /* unsupported major version */
               ^
50.             return -1;
51.         skip_bits_long(&gb, 8 + 16); /* minor version + header count */

libavcodec/get_bits.h:362:1: start of procedure get_bits()
  360.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
  361.  */
  362. static inline unsigned int get_bits(GetBitContext *s, int n){
       ^
  363.     register int tmp;
  364.     OPEN_READER(re, s)

libavcodec/get_bits.h:364:5: 
  362. static inline unsigned int get_bits(GetBitContext *s, int n){
  363.     register int tmp;
  364.     OPEN_READER(re, s)
           ^
  365.     UPDATE_CACHE(re, s)
  366.     tmp= SHOW_UBITS(re, s, n);

libavcodec/get_bits.h:365:5: 
  363.     register int tmp;
  364.     OPEN_READER(re, s)
  365.     UPDATE_CACHE(re, s)
           ^
  366.     tmp= SHOW_UBITS(re, s, n);
  367.     LAST_SKIP_BITS(re, s, n)

libavutil/bswap.h:54:1: start of procedure bswap_32()
    52. 
    53. #ifndef bswap_32
    54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
        ^
    55. {
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);

libavutil/bswap.h:56:5: 
    54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
    55. {
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
            ^
    57.     x= (x>>16) | (x<<16);
    58.     return x;

libavutil/bswap.h:57:5: 
    55. {
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
    57.     x= (x>>16) | (x<<16);
            ^
    58.     return x;
    59. }

libavutil/bswap.h:58:5: 
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
    57.     x= (x>>16) | (x<<16);
    58.     return x;
            ^
    59. }
    60. #endif

libavutil/bswap.h:59:1: return from a call to bswap_32
    57.     x= (x>>16) | (x<<16);
    58.     return x;
    59. }
        ^
    60. #endif
    61. 

libavcodec/get_bits.h:366:5: 
  364.     OPEN_READER(re, s)
  365.     UPDATE_CACHE(re, s)
  366.     tmp= SHOW_UBITS(re, s, n);
           ^
  367.     LAST_SKIP_BITS(re, s, n)
  368.     CLOSE_READER(re, s)

libavcodec/get_bits.h:367:5: 
  365.     UPDATE_CACHE(re, s)
  366.     tmp= SHOW_UBITS(re, s, n);
  367.     LAST_SKIP_BITS(re, s, n)
           ^
  368.     CLOSE_READER(re, s)
  369.     return tmp;

libavcodec/get_bits.h:368:5: 
  366.     tmp= SHOW_UBITS(re, s, n);
  367.     LAST_SKIP_BITS(re, s, n)
  368.     CLOSE_READER(re, s)
           ^
  369.     return tmp;
  370. }

libavcodec/get_bits.h:369:5: 
  367.     LAST_SKIP_BITS(re, s, n)
  368.     CLOSE_READER(re, s)
  369.     return tmp;
           ^
  370. }
  371. 

libavcodec/get_bits.h:370:1: return from a call to get_bits
  368.     CLOSE_READER(re, s)
  369.     return tmp;
  370. }
       ^
  371. 
  372. /**

libavformat/oggparseflac.c:49:12: Taking false branch
47.         uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;
48.         skip_bits_long(&gb, 4*8); /* "FLAC" */
49.         if(get_bits(&gb, 8) != 1) /* unsupported major version */
               ^
50.             return -1;
51.         skip_bits_long(&gb, 8 + 16); /* minor version + header count */

libavformat/oggparseflac.c:51:9: 
49.         if(get_bits(&gb, 8) != 1) /* unsupported major version */
50.             return -1;
51.         skip_bits_long(&gb, 8 + 16); /* minor version + header count */
            ^
52.         skip_bits_long(&gb, 4*8); /* "fLaC" */
53. 

libavcodec/get_bits.h:188:1: start of procedure skip_bits_long()
  186. }
  187. 
  188. static inline void skip_bits_long(GetBitContext *s, int n){
       ^
  189.     s->index += n;
  190. }

libavcodec/get_bits.h:189:5: 
  187. 
  188. static inline void skip_bits_long(GetBitContext *s, int n){
  189.     s->index += n;
           ^
  190. }
  191. 

libavcodec/get_bits.h:190:1: return from a call to skip_bits_long
  188. static inline void skip_bits_long(GetBitContext *s, int n){
  189.     s->index += n;
  190. }
       ^
  191. 
  192. #elif defined LIBMPEG2_BITSTREAM_READER

libavformat/oggparseflac.c:52:9: 
50.             return -1;
51.         skip_bits_long(&gb, 8 + 16); /* minor version + header count */
52.         skip_bits_long(&gb, 4*8); /* "fLaC" */
            ^
53. 
54.         /* METADATA_BLOCK_HEADER */

libavcodec/get_bits.h:188:1: start of procedure skip_bits_long()
  186. }
  187. 
  188. static inline void skip_bits_long(GetBitContext *s, int n){
       ^
  189.     s->index += n;
  190. }

libavcodec/get_bits.h:189:5: 
  187. 
  188. static inline void skip_bits_long(GetBitContext *s, int n){
  189.     s->index += n;
           ^
  190. }
  191. 

libavcodec/get_bits.h:190:1: return from a call to skip_bits_long
  188. static inline void skip_bits_long(GetBitContext *s, int n){
  189.     s->index += n;
  190. }
       ^
  191. 
  192. #elif defined LIBMPEG2_BITSTREAM_READER

libavformat/oggparseflac.c:55:13: 
53. 
54.         /* METADATA_BLOCK_HEADER */
55.         if (get_bits_long(&gb, 32) != FLAC_STREAMINFO_SIZE)
                ^
56.             return -1;
57. 

libavcodec/get_bits.h:424:1: start of procedure get_bits_long()
  422.  * reads 0-32 bits.
  423.  */
  424. static inline unsigned int get_bits_long(GetBitContext *s, int n){
       ^
  425.     if(n<=MIN_CACHE_BITS) return get_bits(s, n);
  426.     else{

libavcodec/get_bits.h:425:8: Taking false branch
  423.  */
  424. static inline unsigned int get_bits_long(GetBitContext *s, int n){
  425.     if(n<=MIN_CACHE_BITS) return get_bits(s, n);
              ^
  426.     else{
  427. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:431:9: 
  429.         return ret | (get_bits(s, n-16) << 16);
  430. #else
  431.         int ret= get_bits(s, 16) << (n-16);
               ^
  432.         return ret | get_bits(s, n-16);
  433. #endif

libavcodec/get_bits.h:362:1: start of procedure get_bits()
    360.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
    361.  */
    362. static inline unsigned int get_bits(GetBitContext *s, int n){
         ^
    363.     register int tmp;
    364.     OPEN_READER(re, s)

libavcodec/get_bits.h:364:5: 
    362. static inline unsigned int get_bits(GetBitContext *s, int n){
    363.     register int tmp;
    364.     OPEN_READER(re, s)
             ^
    365.     UPDATE_CACHE(re, s)
    366.     tmp= SHOW_UBITS(re, s, n);

libavcodec/get_bits.h:365:5: 
    363.     register int tmp;
    364.     OPEN_READER(re, s)
    365.     UPDATE_CACHE(re, s)
             ^
    366.     tmp= SHOW_UBITS(re, s, n);
    367.     LAST_SKIP_BITS(re, s, n)

libavutil/bswap.h:54:1: start of procedure bswap_32()
      52. 
      53. #ifndef bswap_32
      54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
          ^
      55. {
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);

libavutil/bswap.h:56:5: 
      54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
      55. {
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
              ^
      57.     x= (x>>16) | (x<<16);
      58.     return x;

libavutil/bswap.h:57:5: 
      55. {
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
      57.     x= (x>>16) | (x<<16);
              ^
      58.     return x;
      59. }

libavutil/bswap.h:58:5: 
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
      57.     x= (x>>16) | (x<<16);
      58.     return x;
              ^
      59. }
      60. #endif

libavutil/bswap.h:59:1: return from a call to bswap_32
      57.     x= (x>>16) | (x<<16);
      58.     return x;
      59. }
          ^
      60. #endif
      61. 

libavcodec/get_bits.h:366:5: 
    364.     OPEN_READER(re, s)
    365.     UPDATE_CACHE(re, s)
    366.     tmp= SHOW_UBITS(re, s, n);
             ^
    367.     LAST_SKIP_BITS(re, s, n)
    368.     CLOSE_READER(re, s)

libavcodec/get_bits.h:367:5: 
    365.     UPDATE_CACHE(re, s)
    366.     tmp= SHOW_UBITS(re, s, n);
    367.     LAST_SKIP_BITS(re, s, n)
             ^
    368.     CLOSE_READER(re, s)
    369.     return tmp;

libavcodec/get_bits.h:368:5: 
    366.     tmp= SHOW_UBITS(re, s, n);
    367.     LAST_SKIP_BITS(re, s, n)
    368.     CLOSE_READER(re, s)
             ^
    369.     return tmp;
    370. }

libavcodec/get_bits.h:369:5: 
    367.     LAST_SKIP_BITS(re, s, n)
    368.     CLOSE_READER(re, s)
    369.     return tmp;
             ^
    370. }
    371. 

libavcodec/get_bits.h:370:1: return from a call to get_bits
    368.     CLOSE_READER(re, s)
    369.     return tmp;
    370. }
         ^
    371. 
    372. /**

libavcodec/get_bits.h:432:9: 
  430. #else
  431.         int ret= get_bits(s, 16) << (n-16);
  432.         return ret | get_bits(s, n-16);
               ^
  433. #endif
  434.     }

libavcodec/get_bits.h:362:1: start of procedure get_bits()
    360.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
    361.  */
    362. static inline unsigned int get_bits(GetBitContext *s, int n){
         ^
    363.     register int tmp;
    364.     OPEN_READER(re, s)

libavcodec/get_bits.h:364:5: 
    362. static inline unsigned int get_bits(GetBitContext *s, int n){
    363.     register int tmp;
    364.     OPEN_READER(re, s)
             ^
    365.     UPDATE_CACHE(re, s)
    366.     tmp= SHOW_UBITS(re, s, n);

libavcodec/get_bits.h:365:5: 
    363.     register int tmp;
    364.     OPEN_READER(re, s)
    365.     UPDATE_CACHE(re, s)
             ^
    366.     tmp= SHOW_UBITS(re, s, n);
    367.     LAST_SKIP_BITS(re, s, n)

libavutil/bswap.h:54:1: start of procedure bswap_32()
      52. 
      53. #ifndef bswap_32
      54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
          ^
      55. {
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);

libavutil/bswap.h:56:5: 
      54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
      55. {
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
              ^
      57.     x= (x>>16) | (x<<16);
      58.     return x;

libavutil/bswap.h:57:5: 
      55. {
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
      57.     x= (x>>16) | (x<<16);
              ^
      58.     return x;
      59. }

libavutil/bswap.h:58:5: 
      56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
      57.     x= (x>>16) | (x<<16);
      58.     return x;
              ^
      59. }
      60. #endif

libavutil/bswap.h:59:1: return from a call to bswap_32
      57.     x= (x>>16) | (x<<16);
      58.     return x;
      59. }
          ^
      60. #endif
      61. 

libavcodec/get_bits.h:366:5: 
    364.     OPEN_READER(re, s)
    365.     UPDATE_CACHE(re, s)
    366.     tmp= SHOW_UBITS(re, s, n);
             ^
    367.     LAST_SKIP_BITS(re, s, n)
    368.     CLOSE_READER(re, s)

libavcodec/get_bits.h:367:5: 
    365.     UPDATE_CACHE(re, s)
    366.     tmp= SHOW_UBITS(re, s, n);
    367.     LAST_SKIP_BITS(re, s, n)
             ^
    368.     CLOSE_READER(re, s)
    369.     return tmp;

libavcodec/get_bits.h:368:5: 
    366.     tmp= SHOW_UBITS(re, s, n);
    367.     LAST_SKIP_BITS(re, s, n)
    368.     CLOSE_READER(re, s)
             ^
    369.     return tmp;
    370. }

libavcodec/get_bits.h:369:5: 
    367.     LAST_SKIP_BITS(re, s, n)
    368.     CLOSE_READER(re, s)
    369.     return tmp;
             ^
    370. }
    371. 

libavcodec/get_bits.h:370:1: return from a call to get_bits
    368.     CLOSE_READER(re, s)
    369.     return tmp;
    370. }
         ^
    371. 
    372. /**

libavcodec/get_bits.h:435:1: return from a call to get_bits_long
  433. #endif
  434.     }
  435. }
       ^
  436. 
  437. /**

libavformat/oggparseflac.c:55:13: Taking false branch
53. 
54.         /* METADATA_BLOCK_HEADER */
55.         if (get_bits_long(&gb, 32) != FLAC_STREAMINFO_SIZE)
                ^
56.             return -1;
57. 

libavformat/oggparseflac.c:58:9: Skipping ff_flac_parse_streaminfo(): empty list of specs
56.             return -1;
57. 
58.         ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start);
            ^
59. 
60.         st->codec->codec_type = CODEC_TYPE_AUDIO;

libavformat/oggparseflac.c:60:9: 
58.         ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start);
59. 
60.         st->codec->codec_type = CODEC_TYPE_AUDIO;
            ^
61.         st->codec->codec_id = CODEC_ID_FLAC;
62. 

libavformat/oggparseflac.c:61:9: 
59. 
60.         st->codec->codec_type = CODEC_TYPE_AUDIO;
61.         st->codec->codec_id = CODEC_ID_FLAC;
            ^
62. 
63.         st->codec->extradata =

libavformat/oggparseflac.c:63:9: 
61.         st->codec->codec_id = CODEC_ID_FLAC;
62. 
63.         st->codec->extradata =
            ^
64.             av_malloc(FLAC_STREAMINFO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
65.         memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);

libavutil/mem.c:64:1: start of procedure av_malloc()
  62.    linker will do it automatically. */
  63. 
  64. void *av_malloc(unsigned int size)
      ^
  65. {
  66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
  64. void *av_malloc(unsigned int size)
  65. {
  66.     void *ptr = NULL;
          ^
  67. #if CONFIG_MEMALIGN_HACK
  68.     long diff;

libavutil/mem.c:72:8: Taking false branch
  70. 
  71.     /* let's disallow possible ambiguous cases */
  72.     if(size > (INT_MAX-16) )
             ^
  73.         return NULL;
  74. 

libavutil/mem.c:83:9: Taking true branch
  81.     ((char*)ptr)[-1]= diff;
  82. #elif HAVE_POSIX_MEMALIGN
  83.     if (posix_memalign(&ptr,16,size))
              ^
  84.         ptr = NULL;
  85. #elif HAVE_MEMALIGN

libavutil/mem.c:84:9: 
  82. #elif HAVE_POSIX_MEMALIGN
  83.     if (posix_memalign(&ptr,16,size))
  84.         ptr = NULL;
              ^
  85. #elif HAVE_MEMALIGN
  86.     ptr = memalign(16,size);

libavutil/mem.c:116:5: 
  114.     ptr = malloc(size);
  115. #endif
  116.     return ptr;
           ^
  117. }
  118. 

libavutil/mem.c:117:1: return from a call to av_malloc
  115. #endif
  116.     return ptr;
  117. }
       ^
  118. 
  119. void *av_realloc(void *ptr, unsigned int size)

libavformat/oggparseflac.c:65:9: 
63.         st->codec->extradata =
64.             av_malloc(FLAC_STREAMINFO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
65.         memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);
            ^
66.         st->codec->extradata_size = FLAC_STREAMINFO_SIZE;
67. 

static int
flac_header (AVFormatContext * s, int idx)
{
    struct ogg *ogg = s->priv_data;
    struct ogg_stream *os = ogg->streams + idx;
    AVStream *st = s->streams[idx];
    GetBitContext gb;
    FLACStreaminfo si;
    int mdt;
    if (os->buf[os->pstart] == 0xff)
        return 0;
    init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
    skip_bits1(&gb);
    mdt = get_bits(&gb, 7);
    if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {
        uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;
        skip_bits_long(&gb, 4*8);
        if(get_bits(&gb, 8) != 1)
            return -1;
        skip_bits_long(&gb, 8 + 16);
        skip_bits_long(&gb, 4*8);
        if (get_bits_long(&gb, 32) != FLAC_STREAMINFO_SIZE)
            return -1;
        ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start);
        st->codec->codec_type = CODEC_TYPE_AUDIO;
        st->codec->codec_id = CODEC_ID_FLAC;
        st->codec->extradata =
            av_malloc(FLAC_STREAMINFO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
        memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);
        st->codec->extradata_size = FLAC_STREAMINFO_SIZE;
        st->time_base.num = 1;
        st->time_base.den = st->codec->sample_rate;
    } else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) {
        vorbis_comment (s, os->buf + os->pstart + 4, os->psize - 4);
    }
    return 1;
}
['static int\nflac_header (AVFormatContext * s, int idx)\n{\n    struct ogg *ogg = s->priv_data;\n    struct ogg_stream *os = ogg->streams + idx;\n    AVStream *st = s->streams[idx];\n    GetBitContext gb;\n    FLACStreaminfo si;\n    int mdt;\n    if (os->buf[os->pstart] == 0xff)\n        return 0;\n    init_get_bits(&gb, os->buf + os->pstart, os->psize*8);\n    skip_bits1(&gb);\n    mdt = get_bits(&gb, 7);\n    if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {\n        uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;\n        skip_bits_long(&gb, 4*8);\n        if(get_bits(&gb, 8) != 1)\n            return -1;\n        skip_bits_long(&gb, 8 + 16);\n        skip_bits_long(&gb, 4*8);\n        if (get_bits_long(&gb, 32) != FLAC_STREAMINFO_SIZE)\n            return -1;\n        ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start);\n        st->codec->codec_type = CODEC_TYPE_AUDIO;\n        st->codec->codec_id = CODEC_ID_FLAC;\n        st->codec->extradata =\n            av_malloc(FLAC_STREAMINFO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);\n        memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);\n        st->codec->extradata_size = FLAC_STREAMINFO_SIZE;\n        st->time_base.num = 1;\n        st->time_base.den = st->codec->sample_rate;\n    } else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) {\n        vorbis_comment (s, os->buf + os->pstart + 4, os->psize - 4);\n    }\n    return 1;\n}', 'static inline void init_get_bits(GetBitContext *s,\n                   const uint8_t *buffer, int bit_size)\n{\n    int buffer_size= (bit_size+7)>>3;\n    if(buffer_size < 0 || bit_size < 0) {\n        buffer_size = bit_size = 0;\n        buffer = NULL;\n    }\n    s->buffer= buffer;\n    s->size_in_bits= bit_size;\n    s->buffer_end= buffer + buffer_size;\n#ifdef ALT_BITSTREAM_READER\n    s->index=0;\n#elif defined LIBMPEG2_BITSTREAM_READER\n    s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));\n    s->bit_count = 16 + 8*((intptr_t)buffer&1);\n    skip_bits_long(s, 0);\n#elif defined A32_BITSTREAM_READER\n    s->buffer_ptr = (uint32_t*)((intptr_t)buffer&(~3));\n    s->bit_count = 32 + 8*((intptr_t)buffer&3);\n    skip_bits_long(s, 0);\n#endif\n}', 'static inline void skip_bits1(GetBitContext *s){\n    skip_bits(s, 1);\n}', 'static inline void skip_bits(GetBitContext *s, int n){\n    OPEN_READER(re, s)\n    UPDATE_CACHE(re, s)\n    LAST_SKIP_BITS(re, s, n)\n    CLOSE_READER(re, s)\n}', 'static av_always_inline av_const uint32_t bswap_32(uint32_t x)\n{\n    x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);\n    x= (x>>16) | (x<<16);\n    return x;\n}', 'static inline unsigned int get_bits(GetBitContext *s, int n){\n    register int tmp;\n    OPEN_READER(re, s)\n    UPDATE_CACHE(re, s)\n    tmp= SHOW_UBITS(re, s, n);\n    LAST_SKIP_BITS(re, s, n)\n    CLOSE_READER(re, s)\n    return tmp;\n}', 'static inline void skip_bits_long(GetBitContext *s, int n){\n    s->index += n;\n}', 'static inline unsigned int get_bits_long(GetBitContext *s, int n){\n    if(n<=MIN_CACHE_BITS) return get_bits(s, n);\n    else{\n#ifdef ALT_BITSTREAM_READER_LE\n        int ret= get_bits(s, 16);\n        return ret | (get_bits(s, n-16) << 16);\n#else\n        int ret= get_bits(s, 16) << (n-16);\n        return ret | get_bits(s, n-16);\n#endif\n    }\n}', 'void *av_malloc(unsigned int size)\n{\n    void *ptr = NULL;\n#if CONFIG_MEMALIGN_HACK\n    long diff;\n#endif\n    if(size > (INT_MAX-16) )\n        return NULL;\n#if CONFIG_MEMALIGN_HACK\n    ptr = malloc(size+16);\n    if(!ptr)\n        return ptr;\n    diff= ((-(long)ptr - 1)&15) + 1;\n    ptr = (char*)ptr + diff;\n    ((char*)ptr)[-1]= diff;\n#elif HAVE_POSIX_MEMALIGN\n    if (posix_memalign(&ptr,16,size))\n        ptr = NULL;\n#elif HAVE_MEMALIGN\n    ptr = memalign(16,size);\n#else\n    ptr = malloc(size);\n#endif\n    return ptr;\n}']