26 lines
1001 B
Diff
26 lines
1001 B
Diff
From e6541a98b64631836336de17e57efa8e8e0b8425 Mon Sep 17 00:00:00 2001
|
|
From: Vasyl Gello <vasek.gello@gmail.com>
|
|
Date: Sat, 15 Oct 2022 16:09:20 +0000
|
|
Subject: [PATCH] Fix use-after-free in TimeshiftSegment
|
|
|
|
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
|
|
---
|
|
src/stream/TimeshiftSegment.cpp | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/stream/TimeshiftSegment.cpp b/src/stream/TimeshiftSegment.cpp
|
|
index 9323a44a..9e1cd09c 100644
|
|
--- a/src/stream/TimeshiftSegment.cpp
|
|
+++ b/src/stream/TimeshiftSegment.cpp
|
|
@@ -90,8 +90,8 @@ void TimeshiftSegment::AddPacket(DEMUX_PACKET* packet)
|
|
m_packetBuffer.emplace_back(newPacket);
|
|
|
|
int secondsSinceStart = 0;
|
|
- if (packet->pts != STREAM_NOPTS_VALUE && packet->pts > 0)
|
|
- secondsSinceStart = packet->pts / STREAM_TIME_BASE;
|
|
+ if (newPacket->pts != STREAM_NOPTS_VALUE && newPacket->pts > 0)
|
|
+ secondsSinceStart = newPacket->pts / STREAM_TIME_BASE;
|
|
|
|
if (secondsSinceStart != m_lastPacketSecondsSinceStart)
|
|
{
|