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

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

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

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

libavcodec/bitstream.h:90:1: start of procedure init_put_bits()
  88. } PutBitContext;
  89. 
  90. static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
      ^
  91. {
  92.     if(buffer_size < 0) {

libavcodec/bitstream.h:92:8: Taking true branch
  90. static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
  91. {
  92.     if(buffer_size < 0) {
             ^
  93.         buffer_size = 0;
  94.         buffer = NULL;

libavcodec/bitstream.h:93:9: 
  91. {
  92.     if(buffer_size < 0) {
  93.         buffer_size = 0;
              ^
  94.         buffer = NULL;
  95.     }

libavcodec/bitstream.h:94:9: 
  92.     if(buffer_size < 0) {
  93.         buffer_size = 0;
  94.         buffer = NULL;
              ^
  95.     }
  96. 

libavcodec/bitstream.h:97:5: 
  95.     }
  96. 
  97.     s->buf = buffer;
          ^
  98.     s->buf_end = s->buf + buffer_size;
  99. #ifdef ALT_BITSTREAM_WRITER

libavcodec/bitstream.h:98:5: 
   96. 
   97.     s->buf = buffer;
   98.     s->buf_end = s->buf + buffer_size;
           ^
   99. #ifdef ALT_BITSTREAM_WRITER
  100.     s->index=0;

libavcodec/bitstream.h:104:5: 
  102. //    memset(buffer, 0, buffer_size);
  103. #else
  104.     s->buf_ptr = s->buf;
           ^
  105.     s->bit_left=32;
  106.     s->bit_buf=0;

libavcodec/bitstream.h:105:5: 
  103. #else
  104.     s->buf_ptr = s->buf;
  105.     s->bit_left=32;
           ^
  106.     s->bit_buf=0;
  107. #endif

libavcodec/bitstream.h:106:5: 
  104.     s->buf_ptr = s->buf;
  105.     s->bit_left=32;
  106.     s->bit_buf=0;
           ^
  107. #endif
  108. }

libavcodec/bitstream.h:108:1: return from a call to init_put_bits
  106.     s->bit_buf=0;
  107. #endif
  108. }
       ^
  109. 
  110. /* return the number of bits output */

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

libavcodec/bitstream.h:187:1: start of procedure put_bits()
  185. 
  186. #ifndef ALT_BITSTREAM_WRITER
  187. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  188. {
  189.     unsigned int bit_buf;

libavcodec/bitstream.h:193:5: 
  191. 
  192.     //    printf("put_bits=%d %x\n", n, value);
  193.     assert(n == 32 || value < (1U << n));
           ^
  194. 
  195.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:195:5: 
  193.     assert(n == 32 || value < (1U << n));
  194. 
  195.     bit_buf = s->bit_buf;
           ^
  196.     bit_left = s->bit_left;
  197. 

libavcodec/bitstream.h:196:5: 
  194. 
  195.     bit_buf = s->bit_buf;
  196.     bit_left = s->bit_left;
           ^
  197. 
  198.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:218:9: Taking true branch
  216.     bit_left-=n;
  217. #else
  218.     if (n < bit_left) {
               ^
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;

libavcodec/bitstream.h:219:9: 
  217. #else
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
               ^
  220.         bit_left-=n;
  221.     } else {

libavcodec/bitstream.h:220:9: 
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;
               ^
  221.     } else {
  222.         bit_buf<<=bit_left;

libavcodec/bitstream.h:240:5: 
  238. #endif
  239. 
  240.     s->bit_buf = bit_buf;
           ^
  241.     s->bit_left = bit_left;
  242. }

libavcodec/bitstream.h:241:5: 
  239. 
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
           ^
  242. }
  243. #endif

libavcodec/bitstream.h:242:1: return from a call to put_bits
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
  242. }
       ^
  243. #endif
  244. 

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

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

libavcodec/bitstream.h:187:1: start of procedure put_bits()
  185. 
  186. #ifndef ALT_BITSTREAM_WRITER
  187. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  188. {
  189.     unsigned int bit_buf;

libavcodec/bitstream.h:193:5: 
  191. 
  192.     //    printf("put_bits=%d %x\n", n, value);
  193.     assert(n == 32 || value < (1U << n));
           ^
  194. 
  195.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:195:5: 
  193.     assert(n == 32 || value < (1U << n));
  194. 
  195.     bit_buf = s->bit_buf;
           ^
  196.     bit_left = s->bit_left;
  197. 

libavcodec/bitstream.h:196:5: 
  194. 
  195.     bit_buf = s->bit_buf;
  196.     bit_left = s->bit_left;
           ^
  197. 
  198.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:218:9: Taking true branch
  216.     bit_left-=n;
  217. #else
  218.     if (n < bit_left) {
               ^
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;

libavcodec/bitstream.h:219:9: 
  217. #else
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
               ^
  220.         bit_left-=n;
  221.     } else {

libavcodec/bitstream.h:220:9: 
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;
               ^
  221.     } else {
  222.         bit_buf<<=bit_left;

libavcodec/bitstream.h:240:5: 
  238. #endif
  239. 
  240.     s->bit_buf = bit_buf;
           ^
  241.     s->bit_left = bit_left;
  242. }

libavcodec/bitstream.h:241:5: 
  239. 
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
           ^
  242. }
  243. #endif

libavcodec/bitstream.h:242:1: return from a call to put_bits
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
  242. }
       ^
  243. #endif
  244. 

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

libavcodec/bitstream.h:187:1: start of procedure put_bits()
  185. 
  186. #ifndef ALT_BITSTREAM_WRITER
  187. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  188. {
  189.     unsigned int bit_buf;

libavcodec/bitstream.h:193:5: 
  191. 
  192.     //    printf("put_bits=%d %x\n", n, value);
  193.     assert(n == 32 || value < (1U << n));
           ^
  194. 
  195.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:195:5: 
  193.     assert(n == 32 || value < (1U << n));
  194. 
  195.     bit_buf = s->bit_buf;
           ^
  196.     bit_left = s->bit_left;
  197. 

libavcodec/bitstream.h:196:5: 
  194. 
  195.     bit_buf = s->bit_buf;
  196.     bit_left = s->bit_left;
           ^
  197. 
  198.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:218:9: Taking true branch
  216.     bit_left-=n;
  217. #else
  218.     if (n < bit_left) {
               ^
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;

libavcodec/bitstream.h:219:9: 
  217. #else
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
               ^
  220.         bit_left-=n;
  221.     } else {

libavcodec/bitstream.h:220:9: 
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;
               ^
  221.     } else {
  222.         bit_buf<<=bit_left;

libavcodec/bitstream.h:240:5: 
  238. #endif
  239. 
  240.     s->bit_buf = bit_buf;
           ^
  241.     s->bit_left = bit_left;
  242. }

libavcodec/bitstream.h:241:5: 
  239. 
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
           ^
  242. }
  243. #endif

libavcodec/bitstream.h:242:1: return from a call to put_bits
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
  242. }
       ^
  243. #endif
  244. 

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

libavcodec/bitstream.h:187:1: start of procedure put_bits()
  185. 
  186. #ifndef ALT_BITSTREAM_WRITER
  187. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  188. {
  189.     unsigned int bit_buf;

libavcodec/bitstream.h:193:5: 
  191. 
  192.     //    printf("put_bits=%d %x\n", n, value);
  193.     assert(n == 32 || value < (1U << n));
           ^
  194. 
  195.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:195:5: 
  193.     assert(n == 32 || value < (1U << n));
  194. 
  195.     bit_buf = s->bit_buf;
           ^
  196.     bit_left = s->bit_left;
  197. 

libavcodec/bitstream.h:196:5: 
  194. 
  195.     bit_buf = s->bit_buf;
  196.     bit_left = s->bit_left;
           ^
  197. 
  198.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:218:9: Taking true branch
  216.     bit_left-=n;
  217. #else
  218.     if (n < bit_left) {
               ^
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;

libavcodec/bitstream.h:219:9: 
  217. #else
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
               ^
  220.         bit_left-=n;
  221.     } else {

libavcodec/bitstream.h:220:9: 
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;
               ^
  221.     } else {
  222.         bit_buf<<=bit_left;

libavcodec/bitstream.h:240:5: 
  238. #endif
  239. 
  240.     s->bit_buf = bit_buf;
           ^
  241.     s->bit_left = bit_left;
  242. }

libavcodec/bitstream.h:241:5: 
  239. 
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
           ^
  242. }
  243. #endif

libavcodec/bitstream.h:242:1: return from a call to put_bits
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
  242. }
       ^
  243. #endif
  244. 

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

libavcodec/bitstream.h:187:1: start of procedure put_bits()
  185. 
  186. #ifndef ALT_BITSTREAM_WRITER
  187. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  188. {
  189.     unsigned int bit_buf;

libavcodec/bitstream.h:193:5: 
  191. 
  192.     //    printf("put_bits=%d %x\n", n, value);
  193.     assert(n == 32 || value < (1U << n));
           ^
  194. 
  195.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:195:5: 
  193.     assert(n == 32 || value < (1U << n));
  194. 
  195.     bit_buf = s->bit_buf;
           ^
  196.     bit_left = s->bit_left;
  197. 

libavcodec/bitstream.h:196:5: 
  194. 
  195.     bit_buf = s->bit_buf;
  196.     bit_left = s->bit_left;
           ^
  197. 
  198.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:218:9: Taking true branch
  216.     bit_left-=n;
  217. #else
  218.     if (n < bit_left) {
               ^
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;

libavcodec/bitstream.h:219:9: 
  217. #else
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
               ^
  220.         bit_left-=n;
  221.     } else {

libavcodec/bitstream.h:220:9: 
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;
               ^
  221.     } else {
  222.         bit_buf<<=bit_left;

libavcodec/bitstream.h:240:5: 
  238. #endif
  239. 
  240.     s->bit_buf = bit_buf;
           ^
  241.     s->bit_left = bit_left;
  242. }

libavcodec/bitstream.h:241:5: 
  239. 
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
           ^
  242. }
  243. #endif

libavcodec/bitstream.h:242:1: return from a call to put_bits
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
  242. }
       ^
  243. #endif
  244. 

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

libavcodec/bitstream.h:187:1: start of procedure put_bits()
  185. 
  186. #ifndef ALT_BITSTREAM_WRITER
  187. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  188. {
  189.     unsigned int bit_buf;

libavcodec/bitstream.h:193:5: 
  191. 
  192.     //    printf("put_bits=%d %x\n", n, value);
  193.     assert(n == 32 || value < (1U << n));
           ^
  194. 
  195.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:195:5: 
  193.     assert(n == 32 || value < (1U << n));
  194. 
  195.     bit_buf = s->bit_buf;
           ^
  196.     bit_left = s->bit_left;
  197. 

libavcodec/bitstream.h:196:5: 
  194. 
  195.     bit_buf = s->bit_buf;
  196.     bit_left = s->bit_left;
           ^
  197. 
  198.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:218:9: Taking true branch
  216.     bit_left-=n;
  217. #else
  218.     if (n < bit_left) {
               ^
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;

libavcodec/bitstream.h:219:9: 
  217. #else
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
               ^
  220.         bit_left-=n;
  221.     } else {

libavcodec/bitstream.h:220:9: 
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;
               ^
  221.     } else {
  222.         bit_buf<<=bit_left;

libavcodec/bitstream.h:240:5: 
  238. #endif
  239. 
  240.     s->bit_buf = bit_buf;
           ^
  241.     s->bit_left = bit_left;
  242. }

libavcodec/bitstream.h:241:5: 
  239. 
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
           ^
  242. }
  243. #endif

libavcodec/bitstream.h:242:1: return from a call to put_bits
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
  242. }
       ^
  243. #endif
  244. 

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

libavcodec/bitstream.h:187:1: start of procedure put_bits()
  185. 
  186. #ifndef ALT_BITSTREAM_WRITER
  187. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  188. {
  189.     unsigned int bit_buf;

libavcodec/bitstream.h:193:5: 
  191. 
  192.     //    printf("put_bits=%d %x\n", n, value);
  193.     assert(n == 32 || value < (1U << n));
           ^
  194. 
  195.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:195:5: 
  193.     assert(n == 32 || value < (1U << n));
  194. 
  195.     bit_buf = s->bit_buf;
           ^
  196.     bit_left = s->bit_left;
  197. 

libavcodec/bitstream.h:196:5: 
  194. 
  195.     bit_buf = s->bit_buf;
  196.     bit_left = s->bit_left;
           ^
  197. 
  198.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:218:9: Taking true branch
  216.     bit_left-=n;
  217. #else
  218.     if (n < bit_left) {
               ^
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;

libavcodec/bitstream.h:219:9: 
  217. #else
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
               ^
  220.         bit_left-=n;
  221.     } else {

libavcodec/bitstream.h:220:9: 
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;
               ^
  221.     } else {
  222.         bit_buf<<=bit_left;

libavcodec/bitstream.h:240:5: 
  238. #endif
  239. 
  240.     s->bit_buf = bit_buf;
           ^
  241.     s->bit_left = bit_left;
  242. }

libavcodec/bitstream.h:241:5: 
  239. 
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
           ^
  242. }
  243. #endif

libavcodec/bitstream.h:242:1: return from a call to put_bits
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
  242. }
       ^
  243. #endif
  244. 

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

libavcodec/bitstream.h:187:1: start of procedure put_bits()
  185. 
  186. #ifndef ALT_BITSTREAM_WRITER
  187. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  188. {
  189.     unsigned int bit_buf;

libavcodec/bitstream.h:193:5: 
  191. 
  192.     //    printf("put_bits=%d %x\n", n, value);
  193.     assert(n == 32 || value < (1U << n));
           ^
  194. 
  195.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:195:5: 
  193.     assert(n == 32 || value < (1U << n));
  194. 
  195.     bit_buf = s->bit_buf;
           ^
  196.     bit_left = s->bit_left;
  197. 

libavcodec/bitstream.h:196:5: 
  194. 
  195.     bit_buf = s->bit_buf;
  196.     bit_left = s->bit_left;
           ^
  197. 
  198.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:218:9: Taking true branch
  216.     bit_left-=n;
  217. #else
  218.     if (n < bit_left) {
               ^
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;

libavcodec/bitstream.h:219:9: 
  217. #else
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
               ^
  220.         bit_left-=n;
  221.     } else {

libavcodec/bitstream.h:220:9: 
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;
               ^
  221.     } else {
  222.         bit_buf<<=bit_left;

libavcodec/bitstream.h:240:5: 
  238. #endif
  239. 
  240.     s->bit_buf = bit_buf;
           ^
  241.     s->bit_left = bit_left;
  242. }

libavcodec/bitstream.h:241:5: 
  239. 
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
           ^
  242. }
  243. #endif

libavcodec/bitstream.h:242:1: return from a call to put_bits
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
  242. }
       ^
  243. #endif
  244. 

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

libavcodec/bitstream.h:187:1: start of procedure put_bits()
  185. 
  186. #ifndef ALT_BITSTREAM_WRITER
  187. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  188. {
  189.     unsigned int bit_buf;

libavcodec/bitstream.h:193:5: 
  191. 
  192.     //    printf("put_bits=%d %x\n", n, value);
  193.     assert(n == 32 || value < (1U << n));
           ^
  194. 
  195.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:195:5: 
  193.     assert(n == 32 || value < (1U << n));
  194. 
  195.     bit_buf = s->bit_buf;
           ^
  196.     bit_left = s->bit_left;
  197. 

libavcodec/bitstream.h:196:5: 
  194. 
  195.     bit_buf = s->bit_buf;
  196.     bit_left = s->bit_left;
           ^
  197. 
  198.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:218:9: Taking true branch
  216.     bit_left-=n;
  217. #else
  218.     if (n < bit_left) {
               ^
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;

libavcodec/bitstream.h:219:9: 
  217. #else
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
               ^
  220.         bit_left-=n;
  221.     } else {

libavcodec/bitstream.h:220:9: 
  218.     if (n < bit_left) {
  219.         bit_buf = (bit_buf<<n) | value;
  220.         bit_left-=n;
               ^
  221.     } else {
  222.         bit_buf<<=bit_left;

libavcodec/bitstream.h:240:5: 
  238. #endif
  239. 
  240.     s->bit_buf = bit_buf;
           ^
  241.     s->bit_left = bit_left;
  242. }

libavcodec/bitstream.h:241:5: 
  239. 
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
           ^
  242. }
  243. #endif

libavcodec/bitstream.h:242:1: return from a call to put_bits
  240.     s->bit_buf = bit_buf;
  241.     s->bit_left = bit_left;
  242. }
       ^
  243. #endif
  244. 

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

libavcodec/bitstream.h:121:1: start of procedure flush_put_bits()
  119. 
  120. /* pad the end of the output stream with zeros */
  121. static inline void flush_put_bits(PutBitContext *s)
       ^
  122. {
  123. #ifdef ALT_BITSTREAM_WRITER

libavcodec/bitstream.h:127:5: 
  125. #else
  126. #ifndef BITSTREAM_WRITER_LE
  127.     s->bit_buf<<= s->bit_left;
           ^
  128. #endif
  129.     while (s->bit_left < 32) {

libavcodec/bitstream.h:129:12: Loop condition is true. Entering loop body
  127.     s->bit_buf<<= s->bit_left;
  128. #endif
  129.     while (s->bit_left < 32) {
                  ^
  130.         /* XXX: should test end of buffer */
  131. #ifdef BITSTREAM_WRITER_LE

libavcodec/bitstream.h:135:9: 
  133.         s->bit_buf>>=8;
  134. #else
  135.         *s->buf_ptr++=s->bit_buf >> 24;
               ^
  136.         s->bit_buf<<=8;
  137. #endif
