summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index d44347396b..05e061922e 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -1227,9 +1227,9 @@ static int output_frame_end(AC3EncodeContext *s)
flush_put_bits(&s->pb);
/* add zero bytes to reach the frame size */
frame = s->pb.buf;
- n = 2 * s->frame_size - (s->pb.buf_ptr - frame) - 2;
+ n = 2 * s->frame_size - (pbBufPtr(&s->pb) - frame) - 2;
assert(n >= 0);
- memset(s->pb.buf_ptr, 0, n);
+ memset(pbBufPtr(&s->pb), 0, n);
/* Now we must compute both crcs : this is not so easy for crc1
because it is at the beginning of the data... */