From 3d62b9b35dfdd9e0e6a9a359a87345c4ed0381bf Mon Sep 17 00:00:00 2001
From: Thulinma <jaron@vietors.com>
Date: Tue, 24 Sep 2024 15:28:36 +0200
Subject: [PATCH] Prevent AAC and FLV input keepRunning overrides from hiding
 generic functions

---
 src/input/input_aac.cpp | 4 ++--
 src/input/input_aac.h   | 2 +-
 src/input/input_flv.cpp | 4 ++--
 src/input/input_flv.h   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/input/input_aac.cpp b/src/input/input_aac.cpp
index efb65ea1..6800352b 100644
--- a/src/input/input_aac.cpp
+++ b/src/input/input_aac.cpp
@@ -111,7 +111,7 @@ namespace Mist{
   // Overrides the default keepRunning function to shut down
   // if the file disappears or changes, by polling the file's mtime.
   // If neither applies, calls the original function.
-  bool InputAAC::keepRunning(){
+  bool InputAAC::keepRunning(bool updateActCtr){
     struct stat statData;
     if (stat(config->getString("input").c_str(), &statData) == -1){
       INFO_MSG("Shutting down because input file disappeared");
@@ -121,7 +121,7 @@ namespace Mist{
       INFO_MSG("Shutting down because input file changed");
       return false;
     }
-    return Input::keepRunning();
+    return Input::keepRunning(updateActCtr);
   }
   
 
diff --git a/src/input/input_aac.h b/src/input/input_aac.h
index ce8bd812..9b7ad54a 100644
--- a/src/input/input_aac.h
+++ b/src/input/input_aac.h
@@ -16,7 +16,7 @@ namespace Mist{
     bool readHeader();
     void seek(uint64_t seekTime, size_t idx);
     void getNext(size_t idx = INVALID_TRACK_ID);
-    bool keepRunning();
+    bool keepRunning(bool updateActCtr = true);
     uint64_t lastModTime;
     HTTP::URIReader inFile;
     size_t audioTrack;
diff --git a/src/input/input_flv.cpp b/src/input/input_flv.cpp
index 148d3555..85a3c35f 100644
--- a/src/input/input_flv.cpp
+++ b/src/input/input_flv.cpp
@@ -67,7 +67,7 @@ namespace Mist{
   /// Overrides the default keepRunning function to shut down
   /// if the file disappears or changes, by polling the file's mtime.
   /// If neither applies, calls the original function.
-  bool InputFLV::keepRunning(){
+  bool InputFLV::keepRunning(bool updateActCtr){
     struct stat statData;
     if (stat(config->getString("input").c_str(), &statData) == -1){
       INFO_MSG("Shutting down because input file disappeared");
@@ -77,7 +77,7 @@ namespace Mist{
       INFO_MSG("Shutting down because input file changed");
       return false;
     }
-    return Input::keepRunning();
+    return Input::keepRunning(updateActCtr);
   }
 
   bool InputFLV::readHeader(){
diff --git a/src/input/input_flv.h b/src/input/input_flv.h
index 3a455feb..634194b7 100644
--- a/src/input/input_flv.h
+++ b/src/input/input_flv.h
@@ -15,7 +15,7 @@ namespace Mist{
     bool readHeader();
     void getNext(size_t idx = INVALID_TRACK_ID);
     void seek(uint64_t seekTime, size_t idx = INVALID_TRACK_ID);
-    bool keepRunning();
+    bool keepRunning(bool updateActCtr = true);
     FLV::Tag tmpTag;
     uint64_t lastModTime;
     FILE *inFile;