Michael Niedermayer:
> Helps: CID1524598 Improper use of negative value
>
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <[email protected]>
> ---
> tools/enc_recon_frame_test.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/enc_recon_frame_test.c b/tools/enc_recon_frame_test.c
> index c099beb3f4b..d39d6303c2e 100644
> --- a/tools/enc_recon_frame_test.c
> +++ b/tools/enc_recon_frame_test.c
> @@ -28,6 +28,7 @@
> #include "decode_simple.h"
>
> #include "libavutil/adler32.h"
> +#include "libavutil/avassert.h"
> #include "libavutil/common.h"
> #include "libavutil/error.h"
> #include "libavutil/frame.h"
> @@ -89,6 +90,8 @@ static int frame_hash(FrameChecksum **pc, size_t *nb_c,
> int64_t ts,
> int linesize = av_image_get_linesize(frame->format, frame->width, p);
> uint32_t checksum = 0;
>
> + av_assert1(linesize >= 0);
> +
This is a test tool; it should always be picky.
> for (int j = 0; j < frame->height >> shift_v[p]; j++) {
> checksum = av_adler32_update(checksum, data, linesize);
> data += frame->linesize[p];
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".