From 3c2dbf87a555d205730ae561c3d911a189538dee Mon Sep 17 00:00:00 2001 From: zhoujian2 Date: Tue, 23 Feb 2021 15:12:31 +0800 Subject: [PATCH] support .h264 and .h265 suffix --- mediaServer/DynamicRTSPServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediaServer/DynamicRTSPServer.cpp b/mediaServer/DynamicRTSPServer.cpp index cfc4d880..597157b3 100644 --- a/mediaServer/DynamicRTSPServer.cpp +++ b/mediaServer/DynamicRTSPServer.cpp @@ -135,12 +135,12 @@ static ServerMediaSession* createNewSMS(UsageEnvironment& env, // Assumed to be a MPEG-4 Video Elementary Stream file: NEW_SMS("MPEG-4 Video"); sms->addSubsession(MPEG4VideoFileServerMediaSubsession::createNew(env, fileName, reuseSource)); - } else if (strcmp(extension, ".264") == 0) { + } else if (strcmp(extension, ".264") == 0 || strcmp(extension, ".h264") == 0) { // Assumed to be a H.264 Video Elementary Stream file: NEW_SMS("H.264 Video"); OutPacketBuffer::maxSize = 2000000; // allow for some possibly large H.264 frames sms->addSubsession(H264VideoFileServerMediaSubsession::createNew(env, fileName, reuseSource)); - } else if (strcmp(extension, ".265") == 0) { + } else if (strcmp(extension, ".265") == 0 || strcmp(extension, ".h265") == 0) { // Assumed to be a H.265 Video Elementary Stream file: NEW_SMS("H.265 Video"); OutPacketBuffer::maxSize = 2000000; // allow for some possibly large H.265 frames