libavcodec/wmv2enc.c:48: error: Null Dereference
  pointer `&pb->buf_ptr` last assigned on line 35 could be null and is dereferenced by call to `flush_put_bits()` at line 48, column 5.

libavcodec/wmv2enc.c:29:1: start of procedure encode_ext_header()
27. 
28. 
29. static int encode_ext_header(Wmv2Context *w)
    ^
30. {
31.     MpegEncContext *const s = &w->s;

libavcodec/wmv2enc.c:31:5: 
29. static int encode_ext_header(Wmv2Context *w)
30. {
31.     MpegEncContext *const s = &w->s;
        ^
32.     PutBitContext pb;
33.     int code;

libavcodec/wmv2enc.c:35:5: 
33.     int code;
34. 
35.     init_put_bits(&pb, s->avctx->extradata, s->avctx->extradata_size);
        ^
36. 
37.     put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num); // yes 29.97 -> 29

libavcodec/put_bits.h:48:1: start of procedure init_put_bits()
  46.  * @param buffer_size the size in bytes of buffer
  47.  */
  48. static inline void init_put_bits(PutBitContext *s, uint8_t *buffer,
      ^
  49.                                  int buffer_size)
  50. {

libavcodec/put_bits.h:51:9: Taking true branch
  49.                                  int buffer_size)
  50. {
  51.     if (buffer_size < 0) {
              ^
  52.         buffer_size = 0;
  53.         buffer      = NULL;

libavcodec/put_bits.h:52:9: 
  50. {
  51.     if (buffer_size < 0) {
  52.         buffer_size = 0;
              ^
  53.         buffer      = NULL;
  54.     }

libavcodec/put_bits.h:53:9: 
  51.     if (buffer_size < 0) {
  52.         buffer_size = 0;
  53.         buffer      = NULL;
              ^
  54.     }
  55. 

libavcodec/put_bits.h:56:5: 
  54.     }
  55. 
  56.     s->size_in_bits = 8 * buffer_size;
          ^
  57.     s->buf          = buffer;
  58.     s->buf_end      = s->buf + buffer_size;

libavcodec/put_bits.h:57:5: 
  55. 
  56.     s->size_in_bits = 8 * buffer_size;
  57.     s->buf          = buffer;
          ^
  58.     s->buf_end      = s->buf + buffer_size;
  59.     s->buf_ptr      = s->buf;

libavcodec/put_bits.h:58:5: 
  56.     s->size_in_bits = 8 * buffer_size;
  57.     s->buf          = buffer;
  58.     s->buf_end      = s->buf + buffer_size;
          ^
  59.     s->buf_ptr      = s->buf;
  60.     s->bit_left     = 32;

libavcodec/put_bits.h:59:5: 
  57.     s->buf          = buffer;
  58.     s->buf_end      = s->buf + buffer_size;
  59.     s->buf_ptr      = s->buf;
          ^
  60.     s->bit_left     = 32;
  61.     s->bit_buf      = 0;

libavcodec/put_bits.h:60:5: 
  58.     s->buf_end      = s->buf + buffer_size;
  59.     s->buf_ptr      = s->buf;
  60.     s->bit_left     = 32;
          ^
  61.     s->bit_buf      = 0;
  62. }

libavcodec/put_bits.h:61:5: 
  59.     s->buf_ptr      = s->buf;
  60.     s->bit_left     = 32;
  61.     s->bit_buf      = 0;
          ^
  62. }
  63. 

libavcodec/put_bits.h:62:1: return from a call to init_put_bits
  60.     s->bit_left     = 32;
  61.     s->bit_buf      = 0;
  62. }
      ^
  63. 
  64. /**

libavcodec/wmv2enc.c:37:5: 
35.     init_put_bits(&pb, s->avctx->extradata, s->avctx->extradata_size);
36. 
37.     put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num); // yes 29.97 -> 29
        ^
38.     put_bits(&pb, 11, FFMIN(s->bit_rate / 1024, 2047));
39. 

libavcodec/put_bits.h:134:1: start of procedure put_bits()
  132.  * Use put_bits32 to write 32 bits.
  133.  */
  134. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  135. {
  136.     unsigned int bit_buf;

libavcodec/put_bits.h:139:5: 
  137.     int bit_left;
  138. 
  139.     assert(n <= 31 && value < (1U << n));
           ^
  140. 
  141.     bit_buf  = s->bit_buf;

libavcodec/put_bits.h:141:5: 
  139.     assert(n <= 31 && value < (1U << n));
  140. 
  141.     bit_buf  = s->bit_buf;
           ^
  142.     bit_left = s->bit_left;
  143. 

libavcodec/put_bits.h:142:5: 
  140. 
  141.     bit_buf  = s->bit_buf;
  142.     bit_left = s->bit_left;
           ^
  143. 
  144.     /* XXX: optimize */

libavcodec/put_bits.h:155:9: Taking true branch
  153.     bit_left -= n;
  154. #else
  155.     if (n < bit_left) {
               ^
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;

libavcodec/put_bits.h:156:9: 
  154. #else
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
               ^
  157.         bit_left   -= n;
  158.     } else {

libavcodec/put_bits.h:157:9: 
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;
               ^
  158.     } else {
  159.         bit_buf   <<= bit_left;

libavcodec/put_bits.h:168:5: 
  166. #endif
  167. 
  168.     s->bit_buf  = bit_buf;
           ^
  169.     s->bit_left = bit_left;
  170. }

libavcodec/put_bits.h:169:5: 
  167. 
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
           ^
  170. }
  171. 

libavcodec/put_bits.h:170:1: return from a call to put_bits
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
  170. }
       ^
  171. 
  172. static inline void put_sbits(PutBitContext *pb, int n, int32_t value)

libavcodec/wmv2enc.c:38:23: Condition is true
36. 
37.     put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num); // yes 29.97 -> 29
38.     put_bits(&pb, 11, FFMIN(s->bit_rate / 1024, 2047));
                          ^
39. 
40.     put_bits(&pb, 1, w->mspel_bit        = 1);

libavcodec/wmv2enc.c:38:5: 
36. 
37.     put_bits(&pb, 5, s->avctx->time_base.den / s->avctx->time_base.num); // yes 29.97 -> 29
38.     put_bits(&pb, 11, FFMIN(s->bit_rate / 1024, 2047));
        ^
39. 
40.     put_bits(&pb, 1, w->mspel_bit        = 1);

libavcodec/put_bits.h:134:1: start of procedure put_bits()
  132.  * Use put_bits32 to write 32 bits.
  133.  */
  134. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  135. {
  136.     unsigned int bit_buf;

libavcodec/put_bits.h:139:5: 
  137.     int bit_left;
  138. 
  139.     assert(n <= 31 && value < (1U << n));
           ^
  140. 
  141.     bit_buf  = s->bit_buf;

libavcodec/put_bits.h:141:5: 
  139.     assert(n <= 31 && value < (1U << n));
  140. 
  141.     bit_buf  = s->bit_buf;
           ^
  142.     bit_left = s->bit_left;
  143. 

libavcodec/put_bits.h:142:5: 
  140. 
  141.     bit_buf  = s->bit_buf;
  142.     bit_left = s->bit_left;
           ^
  143. 
  144.     /* XXX: optimize */

libavcodec/put_bits.h:155:9: Taking true branch
  153.     bit_left -= n;
  154. #else
  155.     if (n < bit_left) {
               ^
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;

libavcodec/put_bits.h:156:9: 
  154. #else
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
               ^
  157.         bit_left   -= n;
  158.     } else {

libavcodec/put_bits.h:157:9: 
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;
               ^
  158.     } else {
  159.         bit_buf   <<= bit_left;

libavcodec/put_bits.h:168:5: 
  166. #endif
  167. 
  168.     s->bit_buf  = bit_buf;
           ^
  169.     s->bit_left = bit_left;
  170. }

libavcodec/put_bits.h:169:5: 
  167. 
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
           ^
  170. }
  171. 

libavcodec/put_bits.h:170:1: return from a call to put_bits
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
  170. }
       ^
  171. 
  172. static inline void put_sbits(PutBitContext *pb, int n, int32_t value)

libavcodec/wmv2enc.c:40:5: 
38.     put_bits(&pb, 11, FFMIN(s->bit_rate / 1024, 2047));
39. 
40.     put_bits(&pb, 1, w->mspel_bit        = 1);
        ^
41.     put_bits(&pb, 1, s->loop_filter);
42.     put_bits(&pb, 1, w->abt_flag         = 1);

libavcodec/put_bits.h:134:1: start of procedure put_bits()
  132.  * Use put_bits32 to write 32 bits.
  133.  */
  134. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  135. {
  136.     unsigned int bit_buf;

libavcodec/put_bits.h:139:5: 
  137.     int bit_left;
  138. 
  139.     assert(n <= 31 && value < (1U << n));
           ^
  140. 
  141.     bit_buf  = s->bit_buf;

libavcodec/put_bits.h:141:5: 
  139.     assert(n <= 31 && value < (1U << n));
  140. 
  141.     bit_buf  = s->bit_buf;
           ^
  142.     bit_left = s->bit_left;
  143. 

libavcodec/put_bits.h:142:5: 
  140. 
  141.     bit_buf  = s->bit_buf;
  142.     bit_left = s->bit_left;
           ^
  143. 
  144.     /* XXX: optimize */

libavcodec/put_bits.h:155:9: Taking true branch
  153.     bit_left -= n;
  154. #else
  155.     if (n < bit_left) {
               ^
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;

libavcodec/put_bits.h:156:9: 
  154. #else
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
               ^
  157.         bit_left   -= n;
  158.     } else {

libavcodec/put_bits.h:157:9: 
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;
               ^
  158.     } else {
  159.         bit_buf   <<= bit_left;

libavcodec/put_bits.h:168:5: 
  166. #endif
  167. 
  168.     s->bit_buf  = bit_buf;
           ^
  169.     s->bit_left = bit_left;
  170. }

libavcodec/put_bits.h:169:5: 
  167. 
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
           ^
  170. }
  171. 

libavcodec/put_bits.h:170:1: return from a call to put_bits
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
  170. }
       ^
  171. 
  172. static inline void put_sbits(PutBitContext *pb, int n, int32_t value)

libavcodec/wmv2enc.c:41:5: 
39. 
40.     put_bits(&pb, 1, w->mspel_bit        = 1);
41.     put_bits(&pb, 1, s->loop_filter);
        ^
42.     put_bits(&pb, 1, w->abt_flag         = 1);
43.     put_bits(&pb, 1, w->j_type_bit       = 1);

libavcodec/put_bits.h:134:1: start of procedure put_bits()
  132.  * Use put_bits32 to write 32 bits.
  133.  */
  134. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  135. {
  136.     unsigned int bit_buf;

libavcodec/put_bits.h:139:5: 
  137.     int bit_left;
  138. 
  139.     assert(n <= 31 && value < (1U << n));
           ^
  140. 
  141.     bit_buf  = s->bit_buf;

libavcodec/put_bits.h:141:5: 
  139.     assert(n <= 31 && value < (1U << n));
  140. 
  141.     bit_buf  = s->bit_buf;
           ^
  142.     bit_left = s->bit_left;
  143. 

libavcodec/put_bits.h:142:5: 
  140. 
  141.     bit_buf  = s->bit_buf;
  142.     bit_left = s->bit_left;
           ^
  143. 
  144.     /* XXX: optimize */

libavcodec/put_bits.h:155:9: Taking true branch
  153.     bit_left -= n;
  154. #else
  155.     if (n < bit_left) {
               ^
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;

libavcodec/put_bits.h:156:9: 
  154. #else
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
               ^
  157.         bit_left   -= n;
  158.     } else {

libavcodec/put_bits.h:157:9: 
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;
               ^
  158.     } else {
  159.         bit_buf   <<= bit_left;

libavcodec/put_bits.h:168:5: 
  166. #endif
  167. 
  168.     s->bit_buf  = bit_buf;
           ^
  169.     s->bit_left = bit_left;
  170. }

libavcodec/put_bits.h:169:5: 
  167. 
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
           ^
  170. }
  171. 

libavcodec/put_bits.h:170:1: return from a call to put_bits
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
  170. }
       ^
  171. 
  172. static inline void put_sbits(PutBitContext *pb, int n, int32_t value)

libavcodec/wmv2enc.c:42:5: 
40.     put_bits(&pb, 1, w->mspel_bit        = 1);
41.     put_bits(&pb, 1, s->loop_filter);
42.     put_bits(&pb, 1, w->abt_flag         = 1);
        ^
43.     put_bits(&pb, 1, w->j_type_bit       = 1);
44.     put_bits(&pb, 1, w->top_left_mv_flag = 0);

libavcodec/put_bits.h:134:1: start of procedure put_bits()
  132.  * Use put_bits32 to write 32 bits.
  133.  */
  134. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  135. {
  136.     unsigned int bit_buf;

libavcodec/put_bits.h:139:5: 
  137.     int bit_left;
  138. 
  139.     assert(n <= 31 && value < (1U << n));
           ^
  140. 
  141.     bit_buf  = s->bit_buf;

libavcodec/put_bits.h:141:5: 
  139.     assert(n <= 31 && value < (1U << n));
  140. 
  141.     bit_buf  = s->bit_buf;
           ^
  142.     bit_left = s->bit_left;
  143. 

libavcodec/put_bits.h:142:5: 
  140. 
  141.     bit_buf  = s->bit_buf;
  142.     bit_left = s->bit_left;
           ^
  143. 
  144.     /* XXX: optimize */

libavcodec/put_bits.h:155:9: Taking true branch
  153.     bit_left -= n;
  154. #else
  155.     if (n < bit_left) {
               ^
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;

libavcodec/put_bits.h:156:9: 
  154. #else
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
               ^
  157.         bit_left   -= n;
  158.     } else {

libavcodec/put_bits.h:157:9: 
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;
               ^
  158.     } else {
  159.         bit_buf   <<= bit_left;

libavcodec/put_bits.h:168:5: 
  166. #endif
  167. 
  168.     s->bit_buf  = bit_buf;
           ^
  169.     s->bit_left = bit_left;
  170. }

libavcodec/put_bits.h:169:5: 
  167. 
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
           ^
  170. }
  171. 

libavcodec/put_bits.h:170:1: return from a call to put_bits
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
  170. }
       ^
  171. 
  172. static inline void put_sbits(PutBitContext *pb, int n, int32_t value)

libavcodec/wmv2enc.c:43:5: 
41.     put_bits(&pb, 1, s->loop_filter);
42.     put_bits(&pb, 1, w->abt_flag         = 1);
43.     put_bits(&pb, 1, w->j_type_bit       = 1);
        ^
44.     put_bits(&pb, 1, w->top_left_mv_flag = 0);
45.     put_bits(&pb, 1, w->per_mb_rl_bit    = 1);

libavcodec/put_bits.h:134:1: start of procedure put_bits()
  132.  * Use put_bits32 to write 32 bits.
  133.  */
  134. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  135. {
  136.     unsigned int bit_buf;

libavcodec/put_bits.h:139:5: 
  137.     int bit_left;
  138. 
  139.     assert(n <= 31 && value < (1U << n));
           ^
  140. 
  141.     bit_buf  = s->bit_buf;

libavcodec/put_bits.h:141:5: 
  139.     assert(n <= 31 && value < (1U << n));
  140. 
  141.     bit_buf  = s->bit_buf;
           ^
  142.     bit_left = s->bit_left;
  143. 

libavcodec/put_bits.h:142:5: 
  140. 
  141.     bit_buf  = s->bit_buf;
  142.     bit_left = s->bit_left;
           ^
  143. 
  144.     /* XXX: optimize */

libavcodec/put_bits.h:155:9: Taking true branch
  153.     bit_left -= n;
  154. #else
  155.     if (n < bit_left) {
               ^
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;

libavcodec/put_bits.h:156:9: 
  154. #else
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
               ^
  157.         bit_left   -= n;
  158.     } else {

libavcodec/put_bits.h:157:9: 
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;
               ^
  158.     } else {
  159.         bit_buf   <<= bit_left;

libavcodec/put_bits.h:168:5: 
  166. #endif
  167. 
  168.     s->bit_buf  = bit_buf;
           ^
  169.     s->bit_left = bit_left;
  170. }

libavcodec/put_bits.h:169:5: 
  167. 
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
           ^
  170. }
  171. 

libavcodec/put_bits.h:170:1: return from a call to put_bits
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
  170. }
       ^
  171. 
  172. static inline void put_sbits(PutBitContext *pb, int n, int32_t value)

libavcodec/wmv2enc.c:44:5: 
42.     put_bits(&pb, 1, w->abt_flag         = 1);
43.     put_bits(&pb, 1, w->j_type_bit       = 1);
44.     put_bits(&pb, 1, w->top_left_mv_flag = 0);
        ^
45.     put_bits(&pb, 1, w->per_mb_rl_bit    = 1);
46.     put_bits(&pb, 3, code                = 1);

libavcodec/put_bits.h:134:1: start of procedure put_bits()
  132.  * Use put_bits32 to write 32 bits.
  133.  */
  134. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  135. {
  136.     unsigned int bit_buf;

libavcodec/put_bits.h:139:5: 
  137.     int bit_left;
  138. 
  139.     assert(n <= 31 && value < (1U << n));
           ^
  140. 
  141.     bit_buf  = s->bit_buf;

libavcodec/put_bits.h:141:5: 
  139.     assert(n <= 31 && value < (1U << n));
  140. 
  141.     bit_buf  = s->bit_buf;
           ^
  142.     bit_left = s->bit_left;
  143. 

libavcodec/put_bits.h:142:5: 
  140. 
  141.     bit_buf  = s->bit_buf;
  142.     bit_left = s->bit_left;
           ^
  143. 
  144.     /* XXX: optimize */

libavcodec/put_bits.h:155:9: Taking true branch
  153.     bit_left -= n;
  154. #else
  155.     if (n < bit_left) {
               ^
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;

libavcodec/put_bits.h:156:9: 
  154. #else
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
               ^
  157.         bit_left   -= n;
  158.     } else {

libavcodec/put_bits.h:157:9: 
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;
               ^
  158.     } else {
  159.         bit_buf   <<= bit_left;

libavcodec/put_bits.h:168:5: 
  166. #endif
  167. 
  168.     s->bit_buf  = bit_buf;
           ^
  169.     s->bit_left = bit_left;
  170. }

libavcodec/put_bits.h:169:5: 
  167. 
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
           ^
  170. }
  171. 

libavcodec/put_bits.h:170:1: return from a call to put_bits
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
  170. }
       ^
  171. 
  172. static inline void put_sbits(PutBitContext *pb, int n, int32_t value)

libavcodec/wmv2enc.c:45:5: 
43.     put_bits(&pb, 1, w->j_type_bit       = 1);
44.     put_bits(&pb, 1, w->top_left_mv_flag = 0);
45.     put_bits(&pb, 1, w->per_mb_rl_bit    = 1);
        ^
46.     put_bits(&pb, 3, code                = 1);
47. 

libavcodec/put_bits.h:134:1: start of procedure put_bits()
  132.  * Use put_bits32 to write 32 bits.
  133.  */
  134. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  135. {
  136.     unsigned int bit_buf;

libavcodec/put_bits.h:139:5: 
  137.     int bit_left;
  138. 
  139.     assert(n <= 31 && value < (1U << n));
           ^
  140. 
  141.     bit_buf  = s->bit_buf;

libavcodec/put_bits.h:141:5: 
  139.     assert(n <= 31 && value < (1U << n));
  140. 
  141.     bit_buf  = s->bit_buf;
           ^
  142.     bit_left = s->bit_left;
  143. 

libavcodec/put_bits.h:142:5: 
  140. 
  141.     bit_buf  = s->bit_buf;
  142.     bit_left = s->bit_left;
           ^
  143. 
  144.     /* XXX: optimize */

libavcodec/put_bits.h:155:9: Taking true branch
  153.     bit_left -= n;
  154. #else
  155.     if (n < bit_left) {
               ^
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;

libavcodec/put_bits.h:156:9: 
  154. #else
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
               ^
  157.         bit_left   -= n;
  158.     } else {

libavcodec/put_bits.h:157:9: 
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;
               ^
  158.     } else {
  159.         bit_buf   <<= bit_left;

libavcodec/put_bits.h:168:5: 
  166. #endif
  167. 
  168.     s->bit_buf  = bit_buf;
           ^
  169.     s->bit_left = bit_left;
  170. }

libavcodec/put_bits.h:169:5: 
  167. 
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
           ^
  170. }
  171. 

libavcodec/put_bits.h:170:1: return from a call to put_bits
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
  170. }
       ^
  171. 
  172. static inline void put_sbits(PutBitContext *pb, int n, int32_t value)

libavcodec/wmv2enc.c:46:5: 
44.     put_bits(&pb, 1, w->top_left_mv_flag = 0);
45.     put_bits(&pb, 1, w->per_mb_rl_bit    = 1);
46.     put_bits(&pb, 3, code                = 1);
        ^
47. 
48.     flush_put_bits(&pb);

libavcodec/put_bits.h:134:1: start of procedure put_bits()
  132.  * Use put_bits32 to write 32 bits.
  133.  */
  134. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  135. {
  136.     unsigned int bit_buf;

libavcodec/put_bits.h:139:5: 
  137.     int bit_left;
  138. 
  139.     assert(n <= 31 && value < (1U << n));
           ^
  140. 
  141.     bit_buf  = s->bit_buf;

libavcodec/put_bits.h:141:5: 
  139.     assert(n <= 31 && value < (1U << n));
  140. 
  141.     bit_buf  = s->bit_buf;
           ^
  142.     bit_left = s->bit_left;
  143. 

libavcodec/put_bits.h:142:5: 
  140. 
  141.     bit_buf  = s->bit_buf;
  142.     bit_left = s->bit_left;
           ^
  143. 
  144.     /* XXX: optimize */

libavcodec/put_bits.h:155:9: Taking true branch
  153.     bit_left -= n;
  154. #else
  155.     if (n < bit_left) {
               ^
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;

libavcodec/put_bits.h:156:9: 
  154. #else
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
               ^
  157.         bit_left   -= n;
  158.     } else {

libavcodec/put_bits.h:157:9: 
  155.     if (n < bit_left) {
  156.         bit_buf     = (bit_buf << n) | value;
  157.         bit_left   -= n;
               ^
  158.     } else {
  159.         bit_buf   <<= bit_left;

libavcodec/put_bits.h:168:5: 
  166. #endif
  167. 
  168.     s->bit_buf  = bit_buf;
           ^
  169.     s->bit_left = bit_left;
  170. }

libavcodec/put_bits.h:169:5: 
  167. 
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
           ^
  170. }
  171. 

libavcodec/put_bits.h:170:1: return from a call to put_bits
  168.     s->bit_buf  = bit_buf;
  169.     s->bit_left = bit_left;
  170. }
       ^
  171. 
  172. static inline void put_sbits(PutBitContext *pb, int n, int32_t value)

libavcodec/wmv2enc.c:48:5: 
46.     put_bits(&pb, 3, code                = 1);
47. 
48.     flush_put_bits(&pb);
        ^
49. 
50.     s->slice_height = s->mb_height / code;

libavcodec/put_bits.h:83:1: start of procedure flush_put_bits()
  81.  * Pad the end of the output stream with zeros.
  82.  */
  83. static inline void flush_put_bits(PutBitContext *s)
      ^
  84. {
  85. #ifndef BITSTREAM_WRITER_LE

libavcodec/put_bits.h:86:9: Taking true branch
  84. {
  85. #ifndef BITSTREAM_WRITER_LE
  86.     if (s->bit_left < 32)
              ^
  87.         s->bit_buf <<= s->bit_left;
  88. #endif

libavcodec/put_bits.h:87:9: 
  85. #ifndef BITSTREAM_WRITER_LE
  86.     if (s->bit_left < 32)
  87.         s->bit_buf <<= s->bit_left;
              ^
  88. #endif
  89.     while (s->bit_left < 32) {

libavcodec/put_bits.h:89:12: Loop condition is true. Entering loop body
  87.         s->bit_buf <<= s->bit_left;
  88. #endif
  89.     while (s->bit_left < 32) {
                 ^
  90.         /* XXX: should test end of buffer */
  91. #ifdef BITSTREAM_WRITER_LE

libavcodec/put_bits.h:95:9: 
  93.         s->bit_buf  >>= 8;
  94. #else
  95.         *s->buf_ptr++ = s->bit_buf >> 24;
              ^
  96.         s->bit_buf  <<= 8;
  97. #endif
