[MPlayer-dev-eng] [PATCH] support for transmitter-driven demuxing clock
Nico Sabbi
Nicola.Sabbi at poste.it
Sat Feb 23 11:37:07 CET 2008
Il Friday 22 February 2008 00:28:53 Nico Sabbi ha scritto:
> Hi,
> following a heated thread in nut-devel (search "broadcast nut") it became clear
> that in broadcast streams like mpeg-ts (and -ps, although rarely used) following the
> transmitter's reference clock embedded in mpeg as PCR is needed to guarantee
> a minumum buffer fullness in the receiver, otherwise the emptiness of the buffers
> leads to frame freezes and amenities like that (that I've been experiencing for years
> playing DVB and network streams).
>
> The small patch attached changes slightly the behaviour of ds_fill_buffer() so as to keep
> on demuxing the stream until the reference clock has reached the pts of the next ds_packet.
> I should have used the dts, but since
> - pcr < dts <= pts always applies
> - and since the dts can and will be often missing in the PES headers
> - and since dts and pts will always be very near
> I decided not to use the dts at all.
>
> The new behaviour will only be used when the entry demuxer->reference_clock != MP_NOPTS_VALUE,
> that of course applies only to mpeg-ts if the user took care to add the pcr_pid and pmt_pid in the mux,
> thus other formats won't even be affected by this change.
>
> A special case to prevent packets to accumulate without being read was added.
>
> With this patch applied I noticed complete playback stability in the long term, something
> that was seriously lacking (and complained of by broadcast users) in the past.
>
> If no one objects I'll commit saturday.
>
committed
More information about the MPlayer-dev-eng
mailing list