Commit b17f6aad authored by Sam Hocevar's avatar Sam Hocevar

Bon finalement puisque tout le monde dort, je l'ai fait :)

  . rajout de i_pes_real_size dans la structure p_pes_packet, qui vaut 0
   par d�faut, et est initialis� � la taille du payload PES annonc�e dans
   le header si celle-ci est pr�sente.
  . � chaque nouveau paquet TS, si i_pes_real_size == i_pes_size on envoie
   directement le PES au d�codeur sans attendre le d�but du PES suivant.
  . cr�ation de input_ParsePES pour y mettre le code dupliqu� de
   input_DemuxPES.

 Ca fait 1 test de plus par paquet TS, donc n�gligeable. Par contre si
des gens ayant boss� sur l'input ont le temps de v�rifier que je n'ai pas
fait de connerie, �a peut �tre int�ressant :)
parent ee9f4f3e
......@@ -59,8 +59,8 @@ typedef struct pes_packet_s
/* PES properties */
boolean_t b_data_loss; /* The previous (at least) PES packet
* has been lost. The decoders will have to find a way to recover. */
boolean_t b_data_alignment; /* used to find the beginning of a
* video or audio unit */
boolean_t b_data_alignment; /* used to find the beginning of
* a video or audio unit */
boolean_t b_has_pts; /* is the following field set ? */
mtime_t i_pts; /* the PTS for this packet (if set above) */
boolean_t b_random_access;
......@@ -69,10 +69,14 @@ typedef struct pes_packet_s
*/
u8 i_stream_id; /* payload type and id */
int i_pes_size; /* size of the current PES packet */
int i_pes_real_size; /* real size of the current
* PES packet, ie. the one
* announced in the header */
int i_ts_packets;/* number of TS packets in this PES */
/* Demultiplexer environment */
boolean_t b_discard_payload; /* is the packet messed up ? */
boolean_t b_already_parsed; /* was it already parsed ? */
byte_t * p_pes_header; /* pointer to the PES header */
byte_t * p_pes_header_save; /* temporary buffer */
......
......@@ -166,6 +166,7 @@ static __inline__ pes_packet_t* input_NetlistGetPES( input_thread_t *p_input )
p_pes_packet->b_random_access = 0;
p_pes_packet->b_discard_payload = 0;
p_pes_packet->i_pes_size = 0;
p_pes_packet->i_pes_real_size = 0;
p_pes_packet->i_ts_packets = 0;
p_pes_packet->p_first_ts = NULL;
p_pes_packet->p_last_ts = NULL;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment