I am using ffmpeg (server-side) to create a UDP video stream which is then sent over the internet. When receiving the stream and playing it back (client-side) the latency is constant and about 1 second. When the stream is stopped and started again from the server-side, then when playing back the stream the latency is increased to 1.5 seconds. Having researched the matter further, this could be related to an ffmpeg buffer not being flushed either on the encoding side or the decoding side. Can anyone tell me if indeed this is this case, or if not, what the cause of the increased latency may be? Just to note - when I reboot the client-side PC, the latency is back to 1 second.