aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/swfenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-24 22:24:02 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-03-10 04:51:57 +0100
commitb98beb37044e9cecc6da7a6e01f36e120b98c4d9 (patch)
treeadd914608225a6ecb4287731e6abe063725df324 /libavformat/swfenc.c
parent0971fcf0a0821388c5258f46f73bdfbdeadd1b52 (diff)
downloadffmpeg-b98beb37044e9cecc6da7a6e01f36e120b98c4d9.tar.gz
all: Use put_bytes_output() instead of put_bits_ptr - pb->buf
Avoids accessing internals of PutBitContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/swfenc.c')
-rw-r--r--libavformat/swfenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index d106e16d19..fc883b8023 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -124,7 +124,7 @@ static void put_swf_rect(AVIOContext *pb,
put_bits(&p, nbits, ymax & mask);
flush_put_bits(&p);
- avio_write(pb, buf, put_bits_ptr(&p) - p.buf);
+ avio_write(pb, buf, put_bytes_output(&p));
}
static void put_swf_line_edge(PutBitContext *pb, int dx, int dy)
@@ -189,7 +189,7 @@ static void put_swf_matrix(AVIOContext *pb,
put_bits(&p, nbits, ty);
flush_put_bits(&p);
- avio_write(pb, buf, put_bits_ptr(&p) - p.buf);
+ avio_write(pb, buf, put_bytes_output(&p));
}
static int swf_write_header(AVFormatContext *s)
@@ -323,7 +323,7 @@ static int swf_write_header(AVFormatContext *s)
put_bits(&p, 5, 0);
flush_put_bits(&p);
- avio_write(pb, buf1, put_bits_ptr(&p) - p.buf);
+ avio_write(pb, buf1, put_bytes_output(&p));
put_swf_end_tag(s);
}