player: byteseek support

This commit is contained in:
Peter Wu 2012-08-28 17:22:55 +02:00
parent 82b7345944
commit f2d142c9c7

View file

@ -168,6 +168,11 @@ seekDone:
return true;
}
}
if (!strncmp("byteseek ", line, sizeof("byteseek " - 1))){
std::streampos byte = atoi(line + sizeof("byteseek "));
fileSrc.seekg(byte);//if EOF, then it's the client's fault, ignore it.
return true;
}
if (!strcmp("play", line)){
playing = true;
}