avcodec/dvenc: Avoid using PutBitContext fields directly
Also avoid using bitcounts in case one is actually byte-aligned. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
committed by
Andreas Rheinhardt
parent
f9d1528fc9
commit
73fb1b8a9b
@@ -976,11 +976,8 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < 5 * s->sys->bpm; j++) {
|
for (j = 0; j < 5 * s->sys->bpm; j++) {
|
||||||
int pos;
|
|
||||||
int size = pbs[j].size_in_bits >> 3;
|
|
||||||
flush_put_bits(&pbs[j]);
|
flush_put_bits(&pbs[j]);
|
||||||
pos = put_bits_count(&pbs[j]) >> 3;
|
memset(put_bits_ptr(&pbs[j]), 0xff, put_bytes_left(&pbs[j], 0));
|
||||||
memset(pbs[j].buf + pos, 0xff, size - pos);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DV_PROFILE_IS_HD(s->sys))
|
if (DV_PROFILE_IS_HD(s->sys))
|
||||||
|
Reference in New Issue
Block a user