[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does MPE handle the last byte?



> So, if I understand this, it means:
>
> The receiver stops processing the MPEG-2 TS Packet
> Payload after it has processed the end of the MPE Section, 
> when there is no PUSI set. 
>
> That is, it will silently discard the last (unused)
> byte in the example below?

Yes, and 
- the unused byte(s) have to be filled with 0xff
- the next pointer_field has to be 0x00


>From ISO/IEC 13818-1
--------------------

Adaptation fields may occur in Transport Stream packets carrying PSI
sections.

Within a Transport Stream, packet stuffing bytes of value 0xFF may be
found in the payload of Transport Stream packets carrying PSI and/or
private_sections only after the last byte of a section. In this case
all bytes until the end of the Transport Stream packet shall also be
stuffing bytes of value 0xFF. These bytes may be discarded by a
decoder. In such a case, the payload of the next Transport Stream
packet with the same PID value shall begin with a pointer_field of
value 0x00 indicating that the next section starts immediately
thereafter.


It is important to note that within Transport Stream packets of any
single PID value, one section must be finished before the next one is
allowed to be started, or else it is not possible to identify to which
section header the data belongs. If a section finishes before the end
of a Transport Stream packet, but it is not convenient to open another
section, a stuffing mechanism is provided to fill up the
space. Stuffing is performed by filling each remaining byte of the
packet with the value 0xFF. Consequently the table_id value 0xFF is
forbidden, or else this would be confused with stuffing. Once a 0xFF
byte has occurred at the end of a section, then the rest of the
Transport Stream packet must be stuffed with 0xFF bytes, allowing a
decoder to discard the rest of the Transport Stream packet. Stuffing
can also be performed using the normal adaptation_field mechanism.

Patrick.
-- 
UDcast: Full IP over Broadcast Media

Phone:  (+33) (0)4 93 00 16 99
Mobile: (+33) (0)6 14 21 55 98
Fax:    (+33) (0)4 93 00 16 61                 http://www.UDcast.com