[FFmpeg-cvslog] avformat/mxfenc: fix warning: unused function 'klv_ber_length' [-Wunused-function]
Limin Wang
git at videolan.org
Wed Sep 4 20:13:21 EEST 2019
ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Thu Aug 29 16:44:01 2019 +0800| [787c56b9e9e5f9a1b82d2b47f26e8b0924781599] | committer: Tomas Härdin
avformat/mxfenc: fix warning: unused function 'klv_ber_length' [-Wunused-function]
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=787c56b9e9e5f9a1b82d2b47f26e8b0924781599
---
libavformat/mxfenc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 8b3d599a6f..aa23ee3947 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -553,15 +553,14 @@ static int klv_ber_length(uint64_t len)
static int klv_encode_ber_length(AVIOContext *pb, uint64_t len)
{
// Determine the best BER size
- int size;
- if (len < 128) {
+ int size = klv_ber_length(len);
+ if (size == 1) {
//short form
avio_w8(pb, len);
return 1;
}
- size = (av_log2(len) >> 3) + 1;
-
+ size --;
// long form
avio_w8(pb, 0x80 + size);
while(size) {
More information about the ffmpeg-cvslog
mailing list