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.
This commit is contained in:
Zaheer Abbas Merali 2010-07-29 10:38:58 +01:00
parent b1240c850a
commit c7b195740e

View file

@ -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);