Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns
@ 2024-05-21  2:46 Michael Niedermayer
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 2/7] avutil/tests/dict: Check av_dict_set() before get for failure Michael Niedermayer
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Michael Niedermayer @ 2024-05-21  2:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: CID1538296 Structurally dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavutil/random_seed.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavutil/random_seed.c b/libavutil/random_seed.c
index 6d399cee49c..8a4e4f1fc0b 100644
--- a/libavutil/random_seed.c
+++ b/libavutil/random_seed.c
@@ -158,10 +158,10 @@ int av_random_bytes(uint8_t* buf, size_t len)
 #elif CONFIG_OPENSSL
     if (RAND_bytes(buf, len) == 1)
         return 0;
-    err = AVERROR_EXTERNAL;
-#endif
-
+    return AVERROR_EXTERNAL;
+#else
     return err;
+#endif
 }
 
 uint32_t av_get_random_seed(void)
-- 
2.45.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [FFmpeg-devel] [PATCH 2/7] avutil/tests/dict: Check av_dict_set() before get for failure
  2024-05-21  2:46 [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
@ 2024-05-21  2:46 ` Michael Niedermayer
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 3/7] avutil/tests/opt: Check av_set_options_string() " Michael Niedermayer
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Niedermayer @ 2024-05-21  2:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Failure is possible due to strdup()

Fixes: CID1516764 Dereference null return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavutil/tests/dict.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libavutil/tests/dict.c b/libavutil/tests/dict.c
index e45bc220cb3..21368203ce2 100644
--- a/libavutil/tests/dict.c
+++ b/libavutil/tests/dict.c
@@ -150,12 +150,15 @@ int main(void)
 
     //valgrind sensible test
     printf("\nTesting av_dict_set() with existing AVDictionaryEntry.key as key\n");
-    av_dict_set(&dict, "key", "old", 0);
+    if (av_dict_set(&dict, "key", "old", 0) < 0)
+        return 1;
     e = av_dict_get(dict, "key", NULL, 0);
-    av_dict_set(&dict, e->key, "new val OK", 0);
+    if (av_dict_set(&dict, e->key, "new val OK", 0) < 0)
+        return 1;
     e = av_dict_get(dict, "key", NULL, 0);
     printf("%s\n", e->value);
-    av_dict_set(&dict, e->key, e->value, 0);
+    if (av_dict_set(&dict, e->key, e->value, 0) < 0)
+        return 1;
     e = av_dict_get(dict, "key", NULL, 0);
     printf("%s\n", e->value);
     av_dict_free(&dict);
-- 
2.45.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [FFmpeg-devel] [PATCH 3/7] avutil/tests/opt: Check av_set_options_string() for failure
  2024-05-21  2:46 [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 2/7] avutil/tests/dict: Check av_dict_set() before get for failure Michael Niedermayer
@ 2024-05-21  2:46 ` Michael Niedermayer
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 4/7] swscale/x86/swscale: use a clearer name for INPUT_PLANER_RGB_A_FUNC_CASE Michael Niedermayer
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Niedermayer @ 2024-05-21  2:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

This is test code after all so it should test things

Fixes: CID1518990 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavutil/tests/opt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavutil/tests/opt.c b/libavutil/tests/opt.c
index d189938d9ba..02b3ed6e90e 100644
--- a/libavutil/tests/opt.c
+++ b/libavutil/tests/opt.c
@@ -304,6 +304,7 @@ int main(void)
     {
         TestContext test_ctx = { 0 };
         char *buf;
+        int ret;
         test_ctx.class = &test_class;
 
         av_log_set_level(AV_LOG_QUIET);
@@ -314,8 +315,10 @@ int main(void)
             av_opt_free(&test_ctx);
             memset(&test_ctx, 0, sizeof(test_ctx));
             test_ctx.class = &test_class;
-            av_set_options_string(&test_ctx, buf, "=", ",");
+            ret = av_set_options_string(&test_ctx, buf, "=", ",");
             av_free(buf);
+            if (ret < 0)
+                printf("Error ret '%d'\n", ret);
             if (av_opt_serialize(&test_ctx, 0, 0, &buf, '=', ',') >= 0) {
                 ChildContext child_ctx = { 0 };
                 printf("%s\n", buf);
-- 
2.45.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [FFmpeg-devel] [PATCH 4/7] swscale/x86/swscale: use a clearer name for INPUT_PLANER_RGB_A_FUNC_CASE
  2024-05-21  2:46 [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 2/7] avutil/tests/dict: Check av_dict_set() before get for failure Michael Niedermayer
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 3/7] avutil/tests/opt: Check av_set_options_string() " Michael Niedermayer
@ 2024-05-21  2:46 ` Michael Niedermayer
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 5/7] swscale/yuv2rgb: Use 64bit for brightness computation Michael Niedermayer
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Niedermayer @ 2024-05-21  2:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

related: CID1497114 Missing break in switch

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libswscale/x86/swscale.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
index ff16398988a..bc18f9dd08a 100644
--- a/libswscale/x86/swscale.c
+++ b/libswscale/x86/swscale.c
@@ -649,7 +649,7 @@ switch(c->dstBpc){ \
     }
 
 
-#define INPUT_PLANER_RGB_A_FUNC_CASE(fmt, name, opt)                  \
+#define INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(fmt, name, opt)          \
         case fmt:                                                     \
             c->readAlpPlanar = ff_planar_##name##_to_a_##opt;
 
@@ -672,15 +672,15 @@ switch(c->dstBpc){ \
             break;
 
 #define INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \
-        INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##LE,  name##le, opt)       \
+        INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##LE,  name##le, opt)       \
         INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##LE, name##le, opt)       \
-        INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##BE,  name##be, opt)       \
+        INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##BE,  name##be, opt)       \
         INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##BE, name##be, opt)
 
 #define INPUT_PLANER_RGBAXX_UVA_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \
-        INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##LE, name##le, opt)       \
+        INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##LE, name##le, opt)       \
         INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##LE, name##le, opt)       \
-        INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##BE, name##be, opt)       \
+        INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##BE, name##be, opt)       \
         INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##BE, name##be, opt)
 
 #define INPUT_PLANER_RGBAXX_YUV_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt)           \
@@ -696,7 +696,7 @@ switch(c->dstBpc){ \
         INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##BE, name##be, opt)
 
 #define INPUT_PLANER_RGB_YUVA_ALL_CASES(opt)                                                     \
-        INPUT_PLANER_RGB_A_FUNC_CASE(      AV_PIX_FMT_GBRAP,                           rgb, opt) \
+        INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(      AV_PIX_FMT_GBRAP,                           rgb, opt) \
         INPUT_PLANER_RGB_YUV_FUNC_CASE(    AV_PIX_FMT_GBRP,                            rgb, opt) \
         INPUT_PLANER_RGBXX_YUV_FUNC_CASE(  AV_PIX_FMT_GBRP9,                          rgb9, opt) \
         INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(AV_PIX_FMT_GBRP10,  AV_PIX_FMT_GBRAP10,   rgb10, opt) \
@@ -708,7 +708,7 @@ switch(c->dstBpc){ \
 
     if (EXTERNAL_SSE2(cpu_flags)) {
         switch (c->srcFormat) {
-        INPUT_PLANER_RGB_A_FUNC_CASE(      AV_PIX_FMT_GBRAP,                           rgb, sse2);
+        INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(      AV_PIX_FMT_GBRAP,                           rgb, sse2);
         INPUT_PLANER_RGB_UV_FUNC_CASE(     AV_PIX_FMT_GBRP,                            rgb, sse2);
         INPUT_PLANER_RGBXX_UV_FUNC_CASE(   AV_PIX_FMT_GBRP9,                          rgb9, sse2);
         INPUT_PLANER_RGBAXX_UVA_FUNC_CASE( AV_PIX_FMT_GBRP10,  AV_PIX_FMT_GBRAP10,   rgb10, sse2);
-- 
2.45.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [FFmpeg-devel] [PATCH 5/7] swscale/yuv2rgb: Use 64bit for brightness computation
  2024-05-21  2:46 [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
                   ` (2 preceding siblings ...)
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 4/7] swscale/x86/swscale: use a clearer name for INPUT_PLANER_RGB_A_FUNC_CASE Michael Niedermayer
@ 2024-05-21  2:46 ` Michael Niedermayer
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 6/7] tools/decode_simple: Check avcodec_send_packet() for errors on flushing Michael Niedermayer
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Niedermayer @ 2024-05-21  2:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

This will not overflow for normal values
Fixes: CID1500280 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libswscale/yuv2rgb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index 2b2358d2cc1..c1d6236f37f 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -830,7 +830,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4],
     cbu  = (cbu * contrast * saturation) >> 32;
     cgu  = (cgu * contrast * saturation) >> 32;
     cgv  = (cgv * contrast * saturation) >> 32;
-    oy  -= 256 * brightness;
+    oy  -= 256LL * brightness;
 
     c->uOffset = 0x0400040004000400LL;
     c->vOffset = 0x0400040004000400LL;
-- 
2.45.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [FFmpeg-devel] [PATCH 6/7] tools/decode_simple: Check avcodec_send_packet() for errors on flushing
  2024-05-21  2:46 [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
                   ` (3 preceding siblings ...)
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 5/7] swscale/yuv2rgb: Use 64bit for brightness computation Michael Niedermayer
@ 2024-05-21  2:46 ` Michael Niedermayer
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 7/7] tools/enc_recon_frame_test: Assert that av_image_get_linesize() succeeds Michael Niedermayer
  2024-05-27 23:47 ` [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Niedermayer @ 2024-05-21  2:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

This will not error but the API allows errors so we should check it
Fixes: CID1489999 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 tools/decode_simple.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/decode_simple.c b/tools/decode_simple.c
index 6532e368d46..e8c1d6a407e 100644
--- a/tools/decode_simple.c
+++ b/tools/decode_simple.c
@@ -94,8 +94,9 @@ int ds_run(DecodeContext *dc)
             goto finish;
     }
 
-    avcodec_send_packet(dc->decoder, NULL);
-    ret = decode_read(dc, 1);
+    ret = avcodec_send_packet(dc->decoder, NULL);
+    if (ret >= 0)
+        ret = decode_read(dc, 1);
     if (ret < 0) {
         fprintf(stderr, "Error flushing: %d\n", ret);
         return ret;
-- 
2.45.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [FFmpeg-devel] [PATCH 7/7] tools/enc_recon_frame_test: Assert that av_image_get_linesize() succeeds
  2024-05-21  2:46 [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
                   ` (4 preceding siblings ...)
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 6/7] tools/decode_simple: Check avcodec_send_packet() for errors on flushing Michael Niedermayer
@ 2024-05-21  2:46 ` Michael Niedermayer
  2024-05-21  8:07   ` Andreas Rheinhardt
  2024-05-27 23:47 ` [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
  6 siblings, 1 reply; 10+ messages in thread
From: Michael Niedermayer @ 2024-05-21  2:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Helps: CID1524598 Improper use of negative value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 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);
+
         for (int j = 0; j < frame->height >> shift_v[p]; j++) {
             checksum = av_adler32_update(checksum, data, linesize);
             data += frame->linesize[p];
-- 
2.45.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [FFmpeg-devel] [PATCH 7/7] tools/enc_recon_frame_test: Assert that av_image_get_linesize() succeeds
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 7/7] tools/enc_recon_frame_test: Assert that av_image_get_linesize() succeeds Michael Niedermayer
@ 2024-05-21  8:07   ` Andreas Rheinhardt
  2024-05-27 23:42     ` Michael Niedermayer
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Rheinhardt @ 2024-05-21  8:07 UTC (permalink / raw)
  To: ffmpeg-devel

Michael Niedermayer:
> Helps: CID1524598 Improper use of negative value
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  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
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [FFmpeg-devel] [PATCH 7/7] tools/enc_recon_frame_test: Assert that av_image_get_linesize() succeeds
  2024-05-21  8:07   ` Andreas Rheinhardt
@ 2024-05-27 23:42     ` Michael Niedermayer
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Niedermayer @ 2024-05-27 23:42 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 1532 bytes --]

On Tue, May 21, 2024 at 10:07:56AM +0200, Andreas Rheinhardt wrote:
> Michael Niedermayer:
> > Helps: CID1524598 Improper use of negative value
> > 
> > Sponsored-by: Sovereign Tech Fund
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  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.

will apply with av_assert0()

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns
  2024-05-21  2:46 [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
                   ` (5 preceding siblings ...)
  2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 7/7] tools/enc_recon_frame_test: Assert that av_image_get_linesize() succeeds Michael Niedermayer
@ 2024-05-27 23:47 ` Michael Niedermayer
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Niedermayer @ 2024-05-27 23:47 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 577 bytes --]

On Tue, May 21, 2024 at 04:46:46AM +0200, Michael Niedermayer wrote:
> Fixes: CID1538296 Structurally dead code
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavutil/random_seed.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

will apply patches 1-6

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-05-27 23:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-21  2:46 [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer
2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 2/7] avutil/tests/dict: Check av_dict_set() before get for failure Michael Niedermayer
2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 3/7] avutil/tests/opt: Check av_set_options_string() " Michael Niedermayer
2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 4/7] swscale/x86/swscale: use a clearer name for INPUT_PLANER_RGB_A_FUNC_CASE Michael Niedermayer
2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 5/7] swscale/yuv2rgb: Use 64bit for brightness computation Michael Niedermayer
2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 6/7] tools/decode_simple: Check avcodec_send_packet() for errors on flushing Michael Niedermayer
2024-05-21  2:46 ` [FFmpeg-devel] [PATCH 7/7] tools/enc_recon_frame_test: Assert that av_image_get_linesize() succeeds Michael Niedermayer
2024-05-21  8:07   ` Andreas Rheinhardt
2024-05-27 23:42     ` Michael Niedermayer
2024-05-27 23:47 ` [FFmpeg-devel] [PATCH 1/7] avutil/random_seed: Avoid dead returns Michael Niedermayer

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git