From 7e5368627e4c26bf965a3c64fd12ef1f859170a7 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 10 Apr 2020 22:45:26 +1000 Subject: [PATCH] typefind: Consider MPEG-PS PSM to be a PES type Include the Program Stream Map packet type 0xBC in the set of packets we treat as PES. This fixes typefinding on MPEG-PS streams with PSM, where the PSM would previously be considered a loss-of-sync and cause the typefind to require more data. --- gst/typefind/gsttypefindfunctions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 0d6ebb6..cbb0312 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -2222,7 +2222,7 @@ static GstStaticCaps mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, " IS_MPEG_PACK_CODE (((guint8 *)(data))[3])) #define IS_MPEG_PES_CODE(b) (((b) & 0xF0) == 0xE0 || ((b) & 0xF0) == 0xC0 || \ - (b) >= 0xBD) + (b) >= 0xBC) #define IS_MPEG_PES_HEADER(data) (IS_MPEG_HEADER (data) && \ IS_MPEG_PES_CODE (((guint8 *)(data))[3])) -- 2.7.4