Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-25 14:28:54 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-03-30 13:36:32 +0300
commit73fb1b8a9bd6a563a6b58ce8aa215f2f07e91f57 (patch)
tree10f9b3f3455f736bfb00b35e5e771ba617f837f1 /libavcodec/dvenc.c
parentf9d1528fc900dac4975ce785dd95004daeacec39 (diff)
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>
Diffstat (limited to 'libavcodec/dvenc.c')
-rw-r--r--libavcodec/dvenc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c
index 134315a834..e0679c538c 100644
--- a/libavcodec/dvenc.c
+++ b/libavcodec/dvenc.c
@@ -976,11 +976,8 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg)
}
for (j = 0; j < 5 * s->sys->bpm; j++) {
- int pos;
- int size = pbs[j].size_in_bits >> 3;
flush_put_bits(&pbs[j]);
- pos = put_bits_count(&pbs[j]) >> 3;
- memset(pbs[j].buf + pos, 0xff, size - pos);
+ memset(put_bits_ptr(&pbs[j]), 0xff, put_bytes_left(&pbs[j], 0));
}
if (DV_PROFILE_IS_HD(s->sys))