The branch, master has been updated
       via  dcfef80bd93cb4b30b97229a994d682d988dc5d9 (commit)
      from  660983b7f3f699cd982a0688352604cc9ce3c8c6 (commit)


- Log -----------------------------------------------------------------
commit dcfef80bd93cb4b30b97229a994d682d988dc5d9
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Thu Oct 2 21:07:48 2025 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Tue Oct 7 17:36:25 2025 +0200

    avcodec/pngenc: Mark unreachable default switch cases as such
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>

diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 5baad9aad5..8e4f42125e 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -195,6 +195,8 @@ static void png_filter_row(PNGEncContext *c, uint8_t *dst, 
int filter_type,
             dst[i] = src[i] - top[i];
         sub_png_paeth_prediction(dst + i, src + i, top + i, size - i, bpp);
         break;
+    default:
+        av_unreachable("PNG_FILTER_VALUE_MIXED can't happen here and all 
others are covered");
     }
 }
 
@@ -816,6 +818,9 @@ static int apng_do_inverse_blend(AVFrame *output, const 
AVFrame *input,
                         palette[*background] >> 24 == 0)
                         break;
                     return -1;
+
+                default:
+                    av_unreachable("Pixfmt has been checked before");
                 }
 
                 memmove(output_data, foreground, bpp);
@@ -1193,7 +1198,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx)
         s->color_type = PNG_COLOR_TYPE_PALETTE;
         break;
     default:
-        return -1;
+        av_unreachable("Already checked via CODEC_PIXFMTS");
     }
     s->bits_per_pixel = ff_png_get_nb_channels(s->color_type) * s->bit_depth;
 

-----------------------------------------------------------------------

Summary of changes:
 libavcodec/pngenc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to