[FFmpeg-cvslog] avcodec/speedhqenc: Use av_unreachable() for unreachable condition

Andreas Rheinhardt git at videolan.org
Wed May 21 13:47:47 EEST 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri May 24 17:24:59 2024 +0200| [831a0d0c6bc1d666a54794e0e5d81c48311a20f6] | committer: Andreas Rheinhardt

avcodec/speedhqenc: Use av_unreachable() for unreachable condition

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=831a0d0c6bc1d666a54794e0e5d81c48311a20f6
---

 libavcodec/speedhqenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/speedhqenc.c b/libavcodec/speedhqenc.c
index ecba2cd840..a3bcf67e11 100644
--- a/libavcodec/speedhqenc.c
+++ b/libavcodec/speedhqenc.c
@@ -27,6 +27,7 @@
  * SpeedHQ encoder.
  */
 
+#include "libavutil/avassert.h"
 #include "libavutil/thread.h"
 
 #include "avcodec.h"
@@ -259,7 +260,7 @@ static av_cold int speedhq_encode_init(AVCodecContext *avctx)
         avctx->codec_tag = MKTAG('S','H','Q','4');
         break;
     default:
-        av_assert0(0);
+        av_unreachable("Already checked via CODEC_PIXFMTS");
     }
 
     m->encode_picture_header = speedhq_encode_picture_header;



More information about the ffmpeg-cvslog mailing list