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:91:1: start of procedure init_put_bits()
  89. } PutBitContext;
  90. 
  91. static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
      ^
  92. {
  93.     if(buffer_size < 0) {

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

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

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

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

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

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

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

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

libavcodec/bitstream.h:109:1: return from a call to init_put_bits
  107.     s->bit_buf=0;
  108. #endif
  109. }
       ^
  110. 
  111. /* 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:213:1: start of procedure put_bits()
  211. 
  212. #ifndef ALT_BITSTREAM_WRITER
  213. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  214. {
  215.     unsigned int bit_buf;

libavcodec/bitstream.h:219:5: 
  217. 
  218.     //    printf("put_bits=%d %x\n", n, value);
  219.     assert(n == 32 || value < (1U << n));
           ^
  220. 
  221.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:221:5: 
  219.     assert(n == 32 || value < (1U << n));
  220. 
  221.     bit_buf = s->bit_buf;
           ^
  222.     bit_left = s->bit_left;
  223. 

libavcodec/bitstream.h:222:5: 
  220. 
  221.     bit_buf = s->bit_buf;
  222.     bit_left = s->bit_left;
           ^
  223. 
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:226:9: Taking true branch
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
               ^
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;

libavcodec/bitstream.h:227:9: 
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
               ^
  228.         bit_left-=n;
  229.     } else {

libavcodec/bitstream.h:228:9: 
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;
               ^
  229.     } else {
  230.         bit_buf<<=bit_left;

libavcodec/bitstream.h:247:5: 
  245.     }
  246. 
  247.     s->bit_buf = bit_buf;
           ^
  248.     s->bit_left = bit_left;
  249. }

libavcodec/bitstream.h:248:5: 
  246. 
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
           ^
  249. }
  250. #endif

libavcodec/bitstream.h:249:1: return from a call to put_bits
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
  249. }
       ^
  250. #endif
  251. 

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:213:1: start of procedure put_bits()
  211. 
  212. #ifndef ALT_BITSTREAM_WRITER
  213. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  214. {
  215.     unsigned int bit_buf;

libavcodec/bitstream.h:219:5: 
  217. 
  218.     //    printf("put_bits=%d %x\n", n, value);
  219.     assert(n == 32 || value < (1U << n));
           ^
  220. 
  221.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:221:5: 
  219.     assert(n == 32 || value < (1U << n));
  220. 
  221.     bit_buf = s->bit_buf;
           ^
  222.     bit_left = s->bit_left;
  223. 

libavcodec/bitstream.h:222:5: 
  220. 
  221.     bit_buf = s->bit_buf;
  222.     bit_left = s->bit_left;
           ^
  223. 
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:226:9: Taking true branch
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
               ^
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;

libavcodec/bitstream.h:227:9: 
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
               ^
  228.         bit_left-=n;
  229.     } else {

libavcodec/bitstream.h:228:9: 
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;
               ^
  229.     } else {
  230.         bit_buf<<=bit_left;

libavcodec/bitstream.h:247:5: 
  245.     }
  246. 
  247.     s->bit_buf = bit_buf;
           ^
  248.     s->bit_left = bit_left;
  249. }

libavcodec/bitstream.h:248:5: 
  246. 
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
           ^
  249. }
  250. #endif

libavcodec/bitstream.h:249:1: return from a call to put_bits
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
  249. }
       ^
  250. #endif
  251. 

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:213:1: start of procedure put_bits()
  211. 
  212. #ifndef ALT_BITSTREAM_WRITER
  213. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  214. {
  215.     unsigned int bit_buf;

libavcodec/bitstream.h:219:5: 
  217. 
  218.     //    printf("put_bits=%d %x\n", n, value);
  219.     assert(n == 32 || value < (1U << n));
           ^
  220. 
  221.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:221:5: 
  219.     assert(n == 32 || value < (1U << n));
  220. 
  221.     bit_buf = s->bit_buf;
           ^
  222.     bit_left = s->bit_left;
  223. 

libavcodec/bitstream.h:222:5: 
  220. 
  221.     bit_buf = s->bit_buf;
  222.     bit_left = s->bit_left;
           ^
  223. 
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:226:9: Taking true branch
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
               ^
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;

libavcodec/bitstream.h:227:9: 
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
               ^
  228.         bit_left-=n;
  229.     } else {

libavcodec/bitstream.h:228:9: 
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;
               ^
  229.     } else {
  230.         bit_buf<<=bit_left;

libavcodec/bitstream.h:247:5: 
  245.     }
  246. 
  247.     s->bit_buf = bit_buf;
           ^
  248.     s->bit_left = bit_left;
  249. }

libavcodec/bitstream.h:248:5: 
  246. 
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
           ^
  249. }
  250. #endif

libavcodec/bitstream.h:249:1: return from a call to put_bits
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
  249. }
       ^
  250. #endif
  251. 

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:213:1: start of procedure put_bits()
  211. 
  212. #ifndef ALT_BITSTREAM_WRITER
  213. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  214. {
  215.     unsigned int bit_buf;

libavcodec/bitstream.h:219:5: 
  217. 
  218.     //    printf("put_bits=%d %x\n", n, value);
  219.     assert(n == 32 || value < (1U << n));
           ^
  220. 
  221.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:221:5: 
  219.     assert(n == 32 || value < (1U << n));
  220. 
  221.     bit_buf = s->bit_buf;
           ^
  222.     bit_left = s->bit_left;
  223. 

libavcodec/bitstream.h:222:5: 
  220. 
  221.     bit_buf = s->bit_buf;
  222.     bit_left = s->bit_left;
           ^
  223. 
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:226:9: Taking true branch
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
               ^
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;

libavcodec/bitstream.h:227:9: 
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
               ^
  228.         bit_left-=n;
  229.     } else {

libavcodec/bitstream.h:228:9: 
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;
               ^
  229.     } else {
  230.         bit_buf<<=bit_left;

libavcodec/bitstream.h:247:5: 
  245.     }
  246. 
  247.     s->bit_buf = bit_buf;
           ^
  248.     s->bit_left = bit_left;
  249. }

libavcodec/bitstream.h:248:5: 
  246. 
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
           ^
  249. }
  250. #endif

libavcodec/bitstream.h:249:1: return from a call to put_bits
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
  249. }
       ^
  250. #endif
  251. 

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:213:1: start of procedure put_bits()
  211. 
  212. #ifndef ALT_BITSTREAM_WRITER
  213. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  214. {
  215.     unsigned int bit_buf;

libavcodec/bitstream.h:219:5: 
  217. 
  218.     //    printf("put_bits=%d %x\n", n, value);
  219.     assert(n == 32 || value < (1U << n));
           ^
  220. 
  221.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:221:5: 
  219.     assert(n == 32 || value < (1U << n));
  220. 
  221.     bit_buf = s->bit_buf;
           ^
  222.     bit_left = s->bit_left;
  223. 

libavcodec/bitstream.h:222:5: 
  220. 
  221.     bit_buf = s->bit_buf;
  222.     bit_left = s->bit_left;
           ^
  223. 
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:226:9: Taking true branch
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
               ^
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;

libavcodec/bitstream.h:227:9: 
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
               ^
  228.         bit_left-=n;
  229.     } else {

libavcodec/bitstream.h:228:9: 
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;
               ^
  229.     } else {
  230.         bit_buf<<=bit_left;

libavcodec/bitstream.h:247:5: 
  245.     }
  246. 
  247.     s->bit_buf = bit_buf;
           ^
  248.     s->bit_left = bit_left;
  249. }

libavcodec/bitstream.h:248:5: 
  246. 
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
           ^
  249. }
  250. #endif

libavcodec/bitstream.h:249:1: return from a call to put_bits
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
  249. }
       ^
  250. #endif
  251. 

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:213:1: start of procedure put_bits()
  211. 
  212. #ifndef ALT_BITSTREAM_WRITER
  213. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  214. {
  215.     unsigned int bit_buf;

libavcodec/bitstream.h:219:5: 
  217. 
  218.     //    printf("put_bits=%d %x\n", n, value);
  219.     assert(n == 32 || value < (1U << n));
           ^
  220. 
  221.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:221:5: 
  219.     assert(n == 32 || value < (1U << n));
  220. 
  221.     bit_buf = s->bit_buf;
           ^
  222.     bit_left = s->bit_left;
  223. 

libavcodec/bitstream.h:222:5: 
  220. 
  221.     bit_buf = s->bit_buf;
  222.     bit_left = s->bit_left;
           ^
  223. 
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:226:9: Taking true branch
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
               ^
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;

libavcodec/bitstream.h:227:9: 
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
               ^
  228.         bit_left-=n;
  229.     } else {

libavcodec/bitstream.h:228:9: 
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;
               ^
  229.     } else {
  230.         bit_buf<<=bit_left;

libavcodec/bitstream.h:247:5: 
  245.     }
  246. 
  247.     s->bit_buf = bit_buf;
           ^
  248.     s->bit_left = bit_left;
  249. }

libavcodec/bitstream.h:248:5: 
  246. 
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
           ^
  249. }
  250. #endif

libavcodec/bitstream.h:249:1: return from a call to put_bits
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
  249. }
       ^
  250. #endif
  251. 

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:213:1: start of procedure put_bits()
  211. 
  212. #ifndef ALT_BITSTREAM_WRITER
  213. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  214. {
  215.     unsigned int bit_buf;

libavcodec/bitstream.h:219:5: 
  217. 
  218.     //    printf("put_bits=%d %x\n", n, value);
  219.     assert(n == 32 || value < (1U << n));
           ^
  220. 
  221.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:221:5: 
  219.     assert(n == 32 || value < (1U << n));
  220. 
  221.     bit_buf = s->bit_buf;
           ^
  222.     bit_left = s->bit_left;
  223. 

libavcodec/bitstream.h:222:5: 
  220. 
  221.     bit_buf = s->bit_buf;
  222.     bit_left = s->bit_left;
           ^
  223. 
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:226:9: Taking true branch
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
               ^
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;

libavcodec/bitstream.h:227:9: 
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
               ^
  228.         bit_left-=n;
  229.     } else {

libavcodec/bitstream.h:228:9: 
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;
               ^
  229.     } else {
  230.         bit_buf<<=bit_left;

libavcodec/bitstream.h:247:5: 
  245.     }
  246. 
  247.     s->bit_buf = bit_buf;
           ^
  248.     s->bit_left = bit_left;
  249. }

libavcodec/bitstream.h:248:5: 
  246. 
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
           ^
  249. }
  250. #endif

libavcodec/bitstream.h:249:1: return from a call to put_bits
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
  249. }
       ^
  250. #endif
  251. 

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:213:1: start of procedure put_bits()
  211. 
  212. #ifndef ALT_BITSTREAM_WRITER
  213. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  214. {
  215.     unsigned int bit_buf;

libavcodec/bitstream.h:219:5: 
  217. 
  218.     //    printf("put_bits=%d %x\n", n, value);
  219.     assert(n == 32 || value < (1U << n));
           ^
  220. 
  221.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:221:5: 
  219.     assert(n == 32 || value < (1U << n));
  220. 
  221.     bit_buf = s->bit_buf;
           ^
  222.     bit_left = s->bit_left;
  223. 

libavcodec/bitstream.h:222:5: 
  220. 
  221.     bit_buf = s->bit_buf;
  222.     bit_left = s->bit_left;
           ^
  223. 
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:226:9: Taking true branch
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
               ^
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;

libavcodec/bitstream.h:227:9: 
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
               ^
  228.         bit_left-=n;
  229.     } else {

libavcodec/bitstream.h:228:9: 
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;
               ^
  229.     } else {
  230.         bit_buf<<=bit_left;

libavcodec/bitstream.h:247:5: 
  245.     }
  246. 
  247.     s->bit_buf = bit_buf;
           ^
  248.     s->bit_left = bit_left;
  249. }

libavcodec/bitstream.h:248:5: 
  246. 
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
           ^
  249. }
  250. #endif

libavcodec/bitstream.h:249:1: return from a call to put_bits
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
  249. }
       ^
  250. #endif
  251. 

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:213:1: start of procedure put_bits()
  211. 
  212. #ifndef ALT_BITSTREAM_WRITER
  213. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  214. {
  215.     unsigned int bit_buf;

libavcodec/bitstream.h:219:5: 
  217. 
  218.     //    printf("put_bits=%d %x\n", n, value);
  219.     assert(n == 32 || value < (1U << n));
           ^
  220. 
  221.     bit_buf = s->bit_buf;

libavcodec/bitstream.h:221:5: 
  219.     assert(n == 32 || value < (1U << n));
  220. 
  221.     bit_buf = s->bit_buf;
           ^
  222.     bit_left = s->bit_left;
  223. 

libavcodec/bitstream.h:222:5: 
  220. 
  221.     bit_buf = s->bit_buf;
  222.     bit_left = s->bit_left;
           ^
  223. 
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);

libavcodec/bitstream.h:226:9: Taking true branch
  224.     //    printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf);
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
               ^
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;

libavcodec/bitstream.h:227:9: 
  225.     /* XXX: optimize */
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
               ^
  228.         bit_left-=n;
  229.     } else {

libavcodec/bitstream.h:228:9: 
  226.     if (n < bit_left) {
  227.         bit_buf = (bit_buf<<n) | value;
  228.         bit_left-=n;
               ^
  229.     } else {
  230.         bit_buf<<=bit_left;

libavcodec/bitstream.h:247:5: 
  245.     }
  246. 
  247.     s->bit_buf = bit_buf;
           ^
  248.     s->bit_left = bit_left;
  249. }

libavcodec/bitstream.h:248:5: 
  246. 
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
           ^
  249. }
  250. #endif

libavcodec/bitstream.h:249:1: return from a call to put_bits
  247.     s->bit_buf = bit_buf;
  248.     s->bit_left = bit_left;
  249. }
       ^
  250. #endif
  251. 

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:122:1: start of procedure flush_put_bits()
  120. 
  121. /* pad the end of the output stream with zeros */
  122. static inline void flush_put_bits(PutBitContext *s)
       ^
  123. {
  124. #ifdef ALT_BITSTREAM_WRITER

libavcodec/bitstream.h:127:5: 
  125.     align_put_bits(s);
  126. #else
  127.     s->bit_buf<<= s->bit_left;
           ^
  128.     while (s->bit_left < 32) {
  129.         /* XXX: should test end of buffer */

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

libavcodec/bitstream.h:130:9: 
  128.     while (s->bit_left < 32) {
  129.         /* XXX: should test end of buffer */
  130.         *s->buf_ptr++=s->bit_buf >> 24;
               ^
  131.         s->bit_buf<<=8;
  132.         s->bit_left+=8;
