[vlc-commits] demux: adaptive: filter out invalid dts for PCR calculation

Zhao Zhili git at videolan.org
Tue Jan 16 00:18:08 CET 2018


vlc/vlc-3.0 | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Tue Jan  2 13:00:53 2018 +0800| [535c84136bcca230b913ccdd9ed6af1202d7877c] | committer: Francois Cartegnie

demux: adaptive: filter out invalid dts for PCR calculation

Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>
(cherry picked from commit 8caf5ab3c4674d7281b2ef1b95f512a6b4600697)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=535c84136bcca230b913ccdd9ed6af1202d7877c
---

 modules/demux/adaptive/plumbing/CommandsQueue.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.cpp b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
index 850c94b60e..a3e683ade4 100644
--- a/modules/demux/adaptive/plumbing/CommandsQueue.cpp
+++ b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
@@ -355,7 +355,11 @@ mtime_t CommandsQueue::Process( es_out_t *out, mtime_t barrier )
         output.pop_front();
 
         if( command->getType() == ES_OUT_PRIVATE_COMMAND_SEND )
-            lastdts = command->getTime();
+        {
+            mtime_t dts = command->getTime();
+            if( dts != VLC_TS_INVALID )
+                lastdts = dts;
+        }
 
         command->Execute( out );
         delete command;



More information about the vlc-commits mailing list