From c7b195740ec07c6d3849970a008ffa479c055d16 Mon Sep 17 00:00:00 2001 From: Zaheer Abbas Merali Date: Thu, 29 Jul 2010 10:38:58 +0100 Subject: [PATCH] mpegtsparse: actually work when we have small buffers coming in available_fast is not what we want and it will never get to discover packet size if 188 byte buffers are being picked up. --- gst/mpegdemux/mpegtspacketizer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gst/mpegdemux/mpegtspacketizer.c b/gst/mpegdemux/mpegtspacketizer.c index 7230ec1720..e8ce7b3c57 100644 --- a/gst/mpegdemux/mpegtspacketizer.c +++ b/gst/mpegdemux/mpegtspacketizer.c @@ -2074,8 +2074,7 @@ mpegts_try_discover_packet_size (MpegTSPacketizer * packetizer) }; /* wait for 3 sync bytes */ /* so first return if there is not enough data for 4 * max packetsize */ - if (gst_adapter_available_fast (packetizer->adapter) < - MPEGTS_MAX_PACKETSIZE * 4) + if (gst_adapter_available (packetizer->adapter) < MPEGTS_MAX_PACKETSIZE * 4) return; /* check for sync bytes */ dest = g_malloc (MPEGTS_MAX_PACKETSIZE * 4);