Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -172,3 +172,9 @@ uint64_t put_bits_count(in PutBitContext pb) · 171 unmodified lines | |||
| 172 | { | 172 | { |
| 173 | return (pb.buf - pb.buf_start)*8 + BUF_BITS - pb.bit_left; | 173 | return (pb.buf - pb.buf_start)*8 + BUF_BITS - pb.bit_left; |
| 174 | } | 174 | } |
| 175 | |||
| 176 | uint32_t put_bytes_count(in PutBitContext pb) | ||
| 177 | { | ||
| 178 | uint64_t num_bytes = (pb.buf - pb.buf_start) + ((BUF_BITS - pb.bit_left) >> 3); | ||
| 179 | return uint32_t(num_bytes); | ||
| 180 | } | ||