Also avoid using bitcounts in case one is actually byte-aligned.
Unified · Split
| @@ -976,11 +976,8 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg) · 975 unmodified lines | ||
| 976 | 976 | } |
| 977 | 977 | |
| 978 | 978 | for (j = 0; j < 5 * s->sys->bpm; j++) { |
| 979 | − int pos; | |
| 980 | − int size = pbs[j].size_in_bits >> 3; | |
| 981 | 979 | flush_put_bits(&pbs[j]); |
| 982 | − pos = put_bits_count(&pbs[j]) >> 3; | |
| 983 | − memset(pbs[j].buf + pos, 0xff, size - pos); | |
| 980 | + memset(put_bits_ptr(&pbs[j]), 0xff, put_bytes_left(&pbs[j], 0)); | |
| 984 | 981 | } |
| 985 | 982 | |
| 986 | 983 | if (DV_PROFILE_IS_HD(s->sys)) |