[FFmpeg-devel] [PATCH] avformat/argo_cvg: Fix checksum

Zane van Iperen zane at zanevaniperen.com
Tue Feb 15 16:25:52 EET 2022



On 15/2/22 23:05, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>   libavformat/argo_cvg.c | 15 +++++----------
>   libavformat/version.h  |  2 +-
>   2 files changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/libavformat/argo_cvg.c b/libavformat/argo_cvg.c
> index c5da32536d..dfdf126c17 100644
> --- a/libavformat/argo_cvg.c
> +++ b/libavformat/argo_cvg.c
> @@ -335,19 +335,14 @@ static int argo_cvg_write_trailer(AVFormatContext *s)
>       ArgoCVGMuxContext *ctx = s->priv_data;
>       int64_t ret;
>   
> +    ctx->checksum +=  (ctx->size      & 255)
> +                   + ((ctx->size>> 8) & 255)
> +                   + ((ctx->size>>16) & 255)
> +                   +  (ctx->size>>24);
> +

...because of course it's that simple. How did I miss that?
No matter, lgtm!


More information about the ffmpeg-devel mailing list