[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: adaptive: fix deletion order between logic & resources

François Cartegnie (@fcartegnie) gitlab at videolan.org
Thu Jun 12 14:40:27 UTC 2025



François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
cb509e30 by François Cartegnie at 2025-06-12T14:17:35+00:00
demux: adaptive: fix deletion order between logic & resources

- - - - -
7e3ce3d0 by François Cartegnie at 2025-06-12T14:17:35+00:00
demux: adaptive: correct logics default uxtors

- - - - -


10 changed files:

- modules/demux/adaptive/PlaylistManager.cpp
- modules/demux/adaptive/logic/AbstractAdaptationLogic.cpp
- modules/demux/adaptive/logic/AbstractAdaptationLogic.h
- modules/demux/adaptive/logic/AlwaysBestAdaptationLogic.h
- modules/demux/adaptive/logic/AlwaysLowestAdaptationLogic.hpp
- modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
- modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp
- modules/demux/adaptive/logic/RateBasedAdaptationLogic.cpp
- modules/demux/adaptive/logic/RateBasedAdaptationLogic.h
- modules/demux/adaptive/logic/RoundRobinLogic.hpp


Changes:

=====================================
modules/demux/adaptive/PlaylistManager.cpp
=====================================
@@ -92,8 +92,8 @@ PlaylistManager::~PlaylistManager   ()
     delete streamFactory;
     unsetPeriod();
     delete playlist;
-    delete logic;
     delete resources;
+    delete logic;
     delete bufferingLogic;
 }
 


=====================================
modules/demux/adaptive/logic/AbstractAdaptationLogic.cpp
=====================================
@@ -38,10 +38,6 @@ AbstractAdaptationLogic::AbstractAdaptationLogic    (vlc_object_t *obj)
     maxheight = std::numeric_limits<int>::max();
 }
 
-AbstractAdaptationLogic::~AbstractAdaptationLogic   ()
-{
-}
-
 void AbstractAdaptationLogic::updateDownloadRate    (const adaptive::ID &, size_t,
                                                      vlc_tick_t, vlc_tick_t)
 {


=====================================
modules/demux/adaptive/logic/AbstractAdaptationLogic.h
=====================================
@@ -44,8 +44,9 @@ namespace adaptive
                                         public SegmentTrackerListenerInterface
         {
             public:
+                AbstractAdaptationLogic             () = delete;
                 AbstractAdaptationLogic             (vlc_object_t *);
-                virtual ~AbstractAdaptationLogic    ();
+                virtual ~AbstractAdaptationLogic    () = default;
 
                 virtual BaseRepresentation* getNextRepresentation(BaseAdaptationSet *, BaseRepresentation *) = 0;
                 void                        updateDownloadRate     (const ID &, size_t,


=====================================
modules/demux/adaptive/logic/AlwaysBestAdaptationLogic.h
=====================================
@@ -35,6 +35,7 @@ namespace adaptive
         {
             public:
                 AlwaysBestAdaptationLogic           (vlc_object_t *);
+                virtual ~AlwaysBestAdaptationLogic() = default;
 
                 BaseRepresentation *getNextRepresentation(BaseAdaptationSet *,
                                                           BaseRepresentation *) override;


=====================================
modules/demux/adaptive/logic/AlwaysLowestAdaptationLogic.hpp
=====================================
@@ -30,6 +30,7 @@ namespace adaptive
         {
             public:
                 AlwaysLowestAdaptationLogic(vlc_object_t *);
+                virtual ~AlwaysLowestAdaptationLogic() = default;
 
                 BaseRepresentation* getNextRepresentation(BaseAdaptationSet *,
                                                           BaseRepresentation *) override;


=====================================
modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
=====================================
@@ -59,6 +59,7 @@ NearOptimalAdaptationLogic::NearOptimalAdaptationLogic(vlc_object_t *obj)
 
 NearOptimalAdaptationLogic::~NearOptimalAdaptationLogic()
 {
+
 }
 
 BaseRepresentation *


=====================================
modules/demux/adaptive/logic/PredictiveAdaptationLogic.cpp
=====================================
@@ -48,6 +48,11 @@ PredictiveStats::PredictiveStats()
     last_duration = 1;
 }
 
+PredictiveAdaptationLogic::~PredictiveAdaptationLogic()
+{
+
+}
+
 bool PredictiveStats::starting() const
 {
     return (segments_count < 3) || !last_download_rate;
@@ -60,10 +65,6 @@ PredictiveAdaptationLogic::PredictiveAdaptationLogic(vlc_object_t *obj)
     vlc_mutex_init(&lock);
 }
 
-PredictiveAdaptationLogic::~PredictiveAdaptationLogic()
-{
-}
-
 BaseRepresentation *PredictiveAdaptationLogic::getNextRepresentation(BaseAdaptationSet *adaptSet, BaseRepresentation *prevRep)
 {
     RepresentationSelector selector(maxwidth, maxheight);


=====================================
modules/demux/adaptive/logic/RateBasedAdaptationLogic.cpp
=====================================
@@ -46,10 +46,6 @@ RateBasedAdaptationLogic::RateBasedAdaptationLogic  (vlc_object_t *obj) :
     vlc_mutex_init(&lock);
 }
 
-RateBasedAdaptationLogic::~RateBasedAdaptationLogic()
-{
-}
-
 BaseRepresentation *RateBasedAdaptationLogic::getNextRepresentation(BaseAdaptationSet *adaptSet, BaseRepresentation *currep)
 {
     if(adaptSet == nullptr)


=====================================
modules/demux/adaptive/logic/RateBasedAdaptationLogic.h
=====================================
@@ -38,7 +38,7 @@ namespace adaptive
         {
             public:
                 RateBasedAdaptationLogic            (vlc_object_t *);
-                virtual ~RateBasedAdaptationLogic   ();
+                virtual ~RateBasedAdaptationLogic   () = default;
 
                 BaseRepresentation *getNextRepresentation(BaseAdaptationSet *,
                                                           BaseRepresentation *) override;


=====================================
modules/demux/adaptive/logic/RoundRobinLogic.hpp
=====================================
@@ -14,6 +14,7 @@ namespace adaptive
         {
             public:
                 RoundRobinLogic(vlc_object_t *);
+                virtual ~RoundRobinLogic() = default;
 
                 BaseRepresentation* getNextRepresentation(BaseAdaptationSet *,
                                                           BaseRepresentation *) override;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c107a43e0f282d0f5cb89f702cb837e9263d617c...7e3ce3d0d5f4dc091ff5a7a42edb93e2f2752473

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c107a43e0f282d0f5cb89f702cb837e9263d617c...7e3ce3d0d5f4dc091ff5a7a42edb93e2f2752473
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list