Loop support
This commit is contained in:
parent
d94140c660
commit
2db97a1b7b
1 changed files with 42 additions and 37 deletions
|
@ -59,6 +59,10 @@ int main( int argc, char * argv[] ) {
|
||||||
//invalidate the current buffer
|
//invalidate the current buffer
|
||||||
ringbuf[current_buffer]->size = 0;
|
ringbuf[current_buffer]->size = 0;
|
||||||
ringbuf[current_buffer]->number = -1;
|
ringbuf[current_buffer]->number = -1;
|
||||||
|
if (std::cin.peek() == 'F') {
|
||||||
|
//new FLV file, read the file head again.
|
||||||
|
ret = fread(&header,1,13,stdin);
|
||||||
|
} else {
|
||||||
//read FLV frame header - 11 bytes
|
//read FLV frame header - 11 bytes
|
||||||
ret = fread(ringbuf[current_buffer]->data,1,11,stdin);
|
ret = fread(ringbuf[current_buffer]->data,1,11,stdin);
|
||||||
//TODO: Check ret?
|
//TODO: Check ret?
|
||||||
|
@ -101,6 +105,7 @@ int main( int argc, char * argv[] ) {
|
||||||
current_buffer++;
|
current_buffer++;
|
||||||
current_buffer %= buffers;
|
current_buffer %= buffers;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// disconnect listener
|
// disconnect listener
|
||||||
listener.disconnect();
|
listener.disconnect();
|
||||||
|
|
Loading…
Add table
Reference in a new issue