[vlc-devel] [vlc-commits] codec: don't drop discontinue blocks

Rémi Denis-Courmont remi at remlab.net
Tue Oct 13 22:50:01 CEST 2015

Le 2015-10-13 23:33, Ilkka Ollakka a écrit :
> On Tue, Oct 13, 2015 at 10:24:44AM +0300, Rémi Denis-Courmont wrote:
>> Le 2015-10-13 08:20, git at videolan.org a écrit :
>> >vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Sep
>> >18 15:45:33 2015 +0300| [5e36cb2c1485830cf152c05767301a6732b08297] 
>> |
>> >committer: Ilkka Ollakka
>> >codec: don't drop discontinue blocks
>> The patch does not do what it says. Especially flushing on 
>> discontinuity is
>> obviously bad. Please revert.
> Hi,
> Patches are not reverted for futher commenting. Do you see other 
> issue
> with this patch than avcodec_flush_buffers in avcodec?

You don't want to flush on discontinuity. In many cases, the 
discontinuity is due to packet loss. Flushing would drop all pending 
buffers, making the problem much worse than it really is. In some cases, 
the demuxer does not know whether the discontinuity is due to packet 
loss, or due to a new stream with a different timeline - ditto.

Maybe somtimes you know that the discontinuity is due to the start of a 
completely new timeline, and further maybe, you really want to discard 
all pending buffers when that happens (why?). But you cannot "reserve" 
the existing discontinuity flag just for that purpose. And as far as I 
know, the reset PCR control takes care of this case already.

Rémi Denis-Courmont

More information about the vlc-devel mailing list