aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-04-01 09:24:41 (GMT)
committerGerd Hoffmann <kraxel@redhat.com>2010-04-01 09:24:41 (GMT)
commit45a153b46c280b51471ec12854cce623ef8f92be (patch)
treef4387c5c580e750919d0e5106327df0d0c54a645 /common
parentc75c37f7104480a0d386a9e0caa8a72335395503 (diff)
v3.95
Diffstat (limited to 'common')
-rw-r--r--common/capture.c18
-rw-r--r--common/sound.c4
2 files changed, 12 insertions, 10 deletions
diff --git a/common/capture.c b/common/capture.c
index 4396a24..a0b574c 100644
--- a/common/capture.c
+++ b/common/capture.c
@@ -606,7 +606,7 @@ int
movie_grab_put_video(struct movie_handle *h, struct ng_video_buf **ret)
{
struct ng_video_buf *buf;
- int expected;
+ int expected,rc;
if (debug > 1)
fprintf(stderr,"grab_put_video\n");
@@ -639,7 +639,7 @@ movie_grab_put_video(struct movie_handle *h, struct ng_video_buf **ret)
}
h->frames++;
h->vts = buf->info.ts;
- buf->info.seq = h->seq++;
+ buf->info.seq = h->seq;
/* return a pointer to the frame if requested */
if (NULL != ret) {
@@ -648,13 +648,15 @@ movie_grab_put_video(struct movie_handle *h, struct ng_video_buf **ret)
}
/* put into fifo */
- if (h->cthreads) {
- if (0 != fifo_put(&h->cfifo,buf))
- ng_release_video_buf(buf);
- } else {
- if (0 != fifo_put(&h->vfifo,buf))
- ng_release_video_buf(buf);
+ if (h->cthreads)
+ rc = fifo_put(&h->cfifo,buf);
+ else
+ rc = fifo_put(&h->vfifo,buf);
+ if (0 != rc) {
+ ng_release_video_buf(buf);
+ return h->frames;
}
+ h->seq++;
/* feedback */
movie_print_timestamps(h);
diff --git a/common/sound.c b/common/sound.c
index 490d3f2..ae1e042 100644
--- a/common/sound.c
+++ b/common/sound.c
@@ -13,8 +13,8 @@ void
oss_levels(struct ng_audio_buf *buf, int *left, int *right)
{
int lmax,rmax,i,level;
- signed char *s = buf->data;
- unsigned char *u = buf->data;
+ signed char *s = (signed char*) buf->data;
+ unsigned char *u = (unsigned char*) buf->data;
lmax = 0;
rmax = 0;

Privacy Policy