[vlc-commits] demux: adaptive: fix broken debug

Francois Cartegnie git at videolan.org
Wed May 15 16:38:52 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon May 13 16:18:13 2019 +0200| [0bb10daa7012d8b44291b7a86850ba4addf9f051] | committer: Francois Cartegnie

demux: adaptive: fix broken debug

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0bb10daa7012d8b44291b7a86850ba4addf9f051
---

 modules/demux/adaptive/Streams.cpp  | 18 +++++++++++-------
 modules/demux/adaptive/adaptive.cpp |  1 +
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index e15892f9ce..8bf6edfac4 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -416,9 +416,10 @@ AbstractStream::status AbstractStream::dequeue(vlc_tick_t nz_deadline, vlc_tick_
 
     if(fakeEsOut()->commandsQueue()->isDraining())
     {
-        AdvDebug(msg_Dbg(p_realdemux, "Stream %s pcr %" PRId64 " dts %" PRId64 " deadline %" PRId64 " [DRAINING]",
-                         description.c_str(), commandsqueue->getPCR(), commandsqueue->getFirstDTS(),
-                         nz_deadline));
+        AdvDebug(vlc_tick_t pcrvalue = fakeEsOut()->commandsQueue()->getPCR();
+                 vlc_tick_t dtsvalue = fakeEsOut()->commandsQueue()->getFirstDTS();
+                 msg_Dbg(p_realdemux, "Stream %s pcr %" PRId64 " dts %" PRId64 " deadline %" PRId64 " [DRAINING]",
+                         description.c_str(), pcrvalue, dtsvalue, nz_deadline));
 
         *pi_pcr = fakeEsOut()->commandsQueue()->Process(p_realdemux->out, VLC_TICK_0 + nz_deadline);
         if(!fakeEsOut()->commandsQueue()->isEmpty())
@@ -437,11 +438,14 @@ AbstractStream::status AbstractStream::dequeue(vlc_tick_t nz_deadline, vlc_tick_
         return AbstractStream::status_eof;
     }
 
-    AdvDebug(msg_Dbg(p_realdemux, "Stream %s pcr %" PRId64 " dts %" PRId64 " deadline %" PRId64 " buflevel %" PRId64,
-                     description.c_str(), fakeEsOut()->commandsQueue()->getPCR(), fakeEsOut()->commandsQueue()->getFirstDTS(),
-                     nz_deadline, fakeEsOut()->commandsQueue()->getBufferingLevel()));
+    vlc_tick_t bufferingLevel = fakeEsOut()->commandsQueue()->getBufferingLevel();
 
-    if(nz_deadline + VLC_TICK_0 <= fakeEsOut()->commandsQueue()->getBufferingLevel()) /* demuxed */
+    AdvDebug(vlc_tick_t pcrvalue = fakeEsOut()->commandsQueue()->getPCR();
+             vlc_tick_t dtsvalue = fakeEsOut()->commandsQueue()->getFirstDTS();
+             msg_Dbg(p_realdemux, "Stream %s pcr %" PRId64 " dts %" PRId64 " deadline %" PRId64 " buflevel %" PRId64,
+                     description.c_str(), pcrvalue, dtsvalue, nz_deadline, bufferingLevel));
+
+    if(nz_deadline + VLC_TICK_0 <= bufferingLevel) /* demuxed */
     {
         *pi_pcr = fakeEsOut()->commandsQueue()->Process( p_realdemux->out, VLC_TICK_0 + nz_deadline );
         return AbstractStream::status_demuxed;
diff --git a/modules/demux/adaptive/adaptive.cpp b/modules/demux/adaptive/adaptive.cpp
index d12a6f278a..5c5a63d7ba 100644
--- a/modules/demux/adaptive/adaptive.cpp
+++ b/modules/demux/adaptive/adaptive.cpp
@@ -166,6 +166,7 @@ static int Open(vlc_object_t *p_obj)
             if(!strcmp(psz_logic, ppsz_logics_values[i]))
             {
                 logic = pi_logics[i];
+                b_found = true;
                 break;
             }
         }



More information about the vlc-commits mailing list