summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpdemux/demux_rtp.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp
index 35a3751757..f40dfed73c 100644
--- a/libmpdemux/demux_rtp.cpp
+++ b/libmpdemux/demux_rtp.cpp
@@ -501,8 +501,11 @@ static demux_packet_t* getBuffer(demuxer_t* demuxer, demux_stream_t* ds,
scheduler.doEventLoop(&bufferQueue->blockingFlag);
// Set the "ptsBehind" result parameter:
- if (bufferQueue->prevPacketPTS != 0.0 && *(bufferQueue->otherQueue) != NULL
- && (*(bufferQueue->otherQueue))->prevPacketPTS != 0.0) {
+ if (bufferQueue->prevPacketPTS != 0.0
+ && bufferQueue->prevPacketWasSynchronized
+ && *(bufferQueue->otherQueue) != NULL
+ && (*(bufferQueue->otherQueue))->prevPacketPTS != 0.0
+ && (*(bufferQueue->otherQueue))->prevPacketWasSynchronized) {
ptsBehind = (*(bufferQueue->otherQueue))->prevPacketPTS
- bufferQueue->prevPacketPTS;
} else {