[FFmpeg-cvslog] avcodec/motionpixels: Avoid av_unused

Andreas Rheinhardt git at videolan.org
Mon Apr 14 00:18:08 EEST 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Apr 10 12:54:30 2025 +0200| [c8c4e55b2b56f9b95b26eebdb047ec8c57c32476] | committer: Andreas Rheinhardt

avcodec/motionpixels: Avoid av_unused

Easily possible now that -Wdeclaration-after-statement is gone.

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

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

 libavcodec/motionpixels.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index 287f35f305..e5c3daece6 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -70,7 +70,6 @@ static av_cold int mp_decode_end(AVCodecContext *avctx)
 
 static av_cold int mp_decode_init(AVCodecContext *avctx)
 {
-    av_unused static AVOnce init_static_once = AV_ONCE_INIT;
     MotionPixelsContext *mp = avctx->priv_data;
     int w4 = (avctx->width  + 3) & ~3;
     int h4 = (avctx->height + 3) & ~3;
@@ -95,6 +94,7 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
         return AVERROR(ENOMEM);
 
 #if !CONFIG_HARDCODED_TABLES
+    static AVOnce init_static_once = AV_ONCE_INIT;
     ff_thread_once(&init_static_once, motionpixels_tableinit);
 #endif
 



More information about the ffmpeg-cvslog mailing list