OSDN Git Service
(root)
/
rec10
/
rec10-git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
11da0cf
)
tunerec: fix mrb_put remaining bytes calculation, include ctype.h
author
Long.inus
<long.inus@hotmail.co.jp>
Sun, 15 Dec 2013 19:26:03 +0000
(
04:26
+0900)
committer
Long.inus
<long.inus@hotmail.co.jp>
Sun, 15 Dec 2013 19:26:03 +0000
(
04:26
+0900)
tunerec/tunerec.c
patch
|
blob
|
history
diff --git
a/tunerec/tunerec.c
b/tunerec/tunerec.c
index
d1ea2af
..
a30bfe9
100755
(executable)
--- a/
tunerec/tunerec.c
+++ b/
tunerec/tunerec.c
@@
-15,6
+15,7
@@
#include <pthread.h>
#include <stdbool.h>
#include <string.h>
+#include <ctype.h>
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#ifndef DTV_STREAM_ID
@@
-95,7
+96,7
@@
bool mrb_get(mrb* rb, char *target, size_t size) {
// RingBuffer underflow.
return false;
}
- if ( rb->rb_rt + size <=
rb->rb_wt
) {
+ if ( rb->rb_rt + size <=
RING_BUFFER_SIZE
) {
// read bytes + newly taken bytes <= buffer max size
memcpy(target, rb->rb_ptr + rb->rb_rt, size);
rb->rb_rt = rb->rb_rt + size;