From a92d98ab36b23731ef1b6939b0d3ccd9fc256a09 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Fri, 2 Oct 2026 09:36:40 -0300
Subject: Replace NULL pointer constants with nullptr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp | 20 ++++++++++----------
 akode/plugins/jack_sink/jack_sink.cpp           |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp b/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp
index 78b9946..823e63b 100644
--- a/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp
+++ b/akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp
@@ -82,7 +82,7 @@ struct FFMPEGDecoder::private_data
 {
     private_data() : audioStream(-1), videoStream(-1), packetSize(0), position(0),
                      eof(false), error(false), initialized(false), retries(0),
-                     packet(NULL), audioStream_ctx(NULL), videoStream_ctx(NULL) {};
+                     packet(nullptr), audioStream_ctx(nullptr), videoStream_ctx(nullptr) {};
 
     AVFormatContext* ic;
     AVCodec* codec;
@@ -191,13 +191,13 @@ bool FFMPEGDecoder::openFile() {
     }
     d->ic->pb = d->stream;
 
-    if (avformat_open_input(&d->ic, d->src->filename, NULL, NULL) != 0)
+    if (avformat_open_input(&d->ic, d->src->filename, nullptr, nullptr) != 0)
     {
         closeFile();
         return false;
     }
 
-    avformat_find_stream_info( d->ic, NULL );
+    avformat_find_stream_info( d->ic, nullptr );
 
     // Find the first a/v streams
     d->audioStream = -1;
@@ -248,12 +248,12 @@ bool FFMPEGDecoder::openFile() {
 #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100)
         avcodec_free_context(&d->audioStream_ctx);
 #else
-        d->audioStream_ctx = NULL;
+        d->audioStream_ctx = nullptr;
 #endif
         return false;
     }
 
-    avcodec_open2( d->audioStream_ctx, d->codec, NULL );
+    avcodec_open2( d->audioStream_ctx, d->codec, nullptr );
 
     double ffpos = (double)d->ic->streams[d->audioStream]->start_time / (double)AV_TIME_BASE;
     d->position = (long)(ffpos * d->config.sample_rate);
@@ -277,7 +277,7 @@ void FFMPEGDecoder::closeFile() {
 #else
         av_packet_unref( d->packet );
 #endif
-        d->packet = NULL;
+        d->packet = nullptr;
         d->packetSize = 0;
     }
 
@@ -286,7 +286,7 @@ void FFMPEGDecoder::closeFile() {
         avcodec_free_context(&d->audioStream_ctx);
 #else
         avcodec_close( d->audioStream_ctx );
-        d->audioStream_ctx = NULL;
+        d->audioStream_ctx = nullptr;
 #endif
         d->codec = 0;
     }
@@ -317,7 +317,7 @@ bool FFMPEGDecoder::readPacket() {
 #else
             av_packet_unref( d->packet );
 #endif
-            d->packet = NULL;
+            d->packet = nullptr;
             d->packetSize = 0;
             d->packetData = 0;
             return false;
@@ -332,7 +332,7 @@ bool FFMPEGDecoder::readPacket() {
 #else
         av_packet_unref(d->packet);
 #endif
-        d->packet = NULL;
+        d->packet = nullptr;
     } while (true);
 
     return false;
@@ -475,7 +475,7 @@ retry:
 #else
         av_packet_unref( d->packet );
 #endif
-    d->packet = NULL;
+    d->packet = nullptr;
     }
 
     frame->pos = (d->position*1000)/d->config.sample_rate;
diff --git a/akode/plugins/jack_sink/jack_sink.cpp b/akode/plugins/jack_sink/jack_sink.cpp
index f1762d9..d875eaa 100644
--- a/akode/plugins/jack_sink/jack_sink.cpp
+++ b/akode/plugins/jack_sink/jack_sink.cpp
@@ -119,7 +119,7 @@ bool JACKSink::open()
         std::cout << "aKode::Jack: Activate failed\n";
         return false;
     }
-    const char** names = jack_get_ports (m_data->client, NULL, NULL, JackPortIsPhysical|JackPortIsInput);
+    const char** names = jack_get_ports (m_data->client, nullptr, nullptr, JackPortIsPhysical|JackPortIsInput);
     while (*names) {
         std::cout << *names << std::endl;
         names++;
-- 
cgit v1.2.3

