[vlc-devel] [PATCH] add m2ts mode stream format

yanyingjun yanjingjun at ugreen.com
Wed Dec 28 00:45:19 UTC 2022


---
 modules/demux/adaptive/StreamFormat.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/demux/adaptive/StreamFormat.cpp b/modules/demux/adaptive/StreamFormat.cpp
index 03502a80f1..b2a9a30c29 100644
--- a/modules/demux/adaptive/StreamFormat.cpp
+++ b/modules/demux/adaptive/StreamFormat.cpp
@@ -140,6 +140,8 @@ StreamFormat::StreamFormat(const void *data_, size_t sz)
 
     if(sz > 188 && data[0] == 0x47 && data[188] == 0x47)
         type = StreamFormat::Type::MPEG2TS;
+    else if(sz > 196 && data[4] == 0x47 && data[196] == 0x47) /* m2ts mode */
+        type = StreamFormat::Type::MPEG2TS;
     else if(sz > 8 && (!memcmp(&moov,    &data[4], 4) ||
                        !memcmp(&moov[4], &data[4], 4) ||
                        !memcmp(&moov[8], &data[4], 4) ||
-- 
2.25.1




More information about the vlc-devel mailing list