[vlc-devel] duplicate handling

Rémi Denis-Courmont rem at videolan.org
Thu Jan 15 20:31:15 CET 2009


Le jeudi 15 janvier 2009 20:47:20 Abhijit Choudhury (achoudhu), vous avez 
écrit :
> Suppose we have a video mcast stream over UDP coming in to a laptop
> running VLC. Let's assume the laptop is running Windows XP.
> When the stream comprises  IP packets A, B, C, D, E, F....
> the video shows fine on VLC.

> What would happen when
> A)the stream is  A, A, B, B, C, C, E, E, F, F...
>    - every packet is duplicated at the IP level - same IP pkt header
>      and payload On every duplicate

VLC will detect duplicates based on RTP sequence numbers and ignore them.
Of course, that assumes you're using RTP in the first place.

> B) the stream is  A, B,  C, A, D, E, F, B,C, G
>    - every packet is duplicated at the IP level, but don't
>      necessarily arrive back to back

Same thing. Either way, if the original packet is still in the de-jitter 
buffer, then the duplication will be detected and ignored; otherwise the 
original packet is already decoded and the duplicate will be classified "too 
late" and dropped as well.

> C) the stream is A, B, C, A, D, E, F,
>       - an occasional packet is duplicated at the IP level

No difference. You can even triple packets if you like.

> What I'm trying to understand is whether VLC can detect and weed out
> duplicates.  If someone could explain, exactly how VLC deals with
> cuplicates, that'd be great.

VLC matches RTP sequence numbers.

Rémi Denis-Courmont

More information about the vlc-devel mailing list