From b3eb7443f98507efac5d6c328808d0a1852ba511 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 2 Dec 2021 11:53:04 +0100 Subject: [PATCH] Fixed TS input H265 keyframe detection --- lib/ts_stream.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ts_stream.cpp b/lib/ts_stream.cpp index 1cab14e1..f64c56cf 100644 --- a/lib/ts_stream.cpp +++ b/lib/ts_stream.cpp @@ -856,7 +856,7 @@ namespace TS{ default: break; } }else if (pidToCodec[tid] == H265){ - typeNal = (((pesPayload[0] & 0x7E) >> 1) & 0xFF); + typeNal = (pesPayload[0] & 0x7E) >> 1; switch (typeNal){ case 2: case 3: // TSA Picture @@ -865,7 +865,10 @@ namespace TS{ case 6: case 7: // RADL Picture case 8: - case 9: // RASL Picture + case 9:{// RASL Picture + isKeyFrame = false; + break; + } case 16: case 17: case 18: // BLA Picture