#define TS_PACKET_SIZE_192 192
#define TS_PACKET_SIZE_204 204
#define TS_PACKET_SIZE_MAX 204
+#define TS_HEADER_SIZE 4
static int DetectPacketSize( demux_t *p_demux, int *pi_header_size, int i_offset )
{
return NULL;
}
+ if( p_pkt->i_buffer < TS_HEADER_SIZE + p_sys->i_packet_header_size )
+ {
+ block_Release( p_pkt );
+ return NULL;
+ }
+
/* Skip header (BluRay streams).
* re-sync logic would do this (by adjusting packet start), but this would result in losing first and last ts packets.
* First packet is usually PAT, and losing it means losing whole first GOP. This is fatal with still-image based menus.