fixed flushing buffered frames from the decoder
fix compiling ffmpeg and avconv
added seek method and test