[FFmpeg-devel] avformat/mxfenc: Remove unused function

Submitted by Andreas Rheinhardt on July 30, 2019, 7:12 a.m.

Details

Message ID 20190730071229.23652-1-andreas.rheinhardt@gmail.com
State New
Headers show

Commit Message

Andreas Rheinhardt July 30, 2019, 7:12 a.m.
klv_ber_length is unused since 9e24b98b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/mxfenc.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Tomas Härdin July 30, 2019, 11:47 a.m.
tis 2019-07-30 klockan 09:12 +0200 skrev Andreas Rheinhardt:
> klv_ber_length is unused since 9e24b98b.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/mxfenc.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> index 2e54320cf0..0cb0617919 100644
> --- a/libavformat/mxfenc.c
> +++ b/libavformat/mxfenc.c
> @@ -542,14 +542,6 @@ static void mxf_write_refs_count(AVIOContext
> *pb, int ref_count)
>      avio_wb32(pb, 16);
>  }
>  
> -static int klv_ber_length(uint64_t len)
> -{
> -    if (len < 128)
> -        return 1;
> -    else
> -        return (av_log2(len) >> 3) + 2;
> -}

I think it might be preferably to have klv_encode_ber_length() make use
of it instead. That way we still have it around, in case we start
running into situations where we need to compute a BER length again

/Tomas

Patch hide | download patch | download mbox

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 2e54320cf0..0cb0617919 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -542,14 +542,6 @@  static void mxf_write_refs_count(AVIOContext *pb, int ref_count)
     avio_wb32(pb, 16);
 }
 
-static int klv_ber_length(uint64_t len)
-{
-    if (len < 128)
-        return 1;
-    else
-        return (av_log2(len) >> 3) + 2;
-}
-
 static int klv_encode_ber_length(AVIOContext *pb, uint64_t len)
 {
     // Determine the best BER size