Seamless looping

I have had a stab at seamless looping for streams that can seek: at EOF, rewind the reader and continue to feed packets into the decoder, but with modified PTS/DTS.