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

Tomas Härdin tjoppen at acc.umu.se
Tue Jul 30 14:47:47 EEST 2019


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 at 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




More information about the ffmpeg-devel mailing list