summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-06-09 16:44:31 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-06-09 16:44:31 +0000
commit90ce70aa406c964c80f1d3df857073cc01813be7 (patch)
tree0c919f73668ad0d8a51543e69798c545d31dfe68
parent9fb2c57295d79232446e00107442351d24275998 (diff)
downloadgst-plugins-bad-90ce70aa406c964c80f1d3df857073cc01813be7.tar.gz
gst-plugins-bad-90ce70aa406c964c80f1d3df857073cc01813be7.tar.bz2
gst-plugins-bad-90ce70aa406c964c80f1d3df857073cc01813be7.zip
sys/v4l2/gstv4l2src.c: Don't use bytesused/length of a buffer for GST_BUFFER_SIZE(), since length is the allocated le...
Original commit message from CVS: * sys/v4l2/gstv4l2src.c: (gst_v4l2src_get): Don't use bytesused/length of a buffer for GST_BUFFER_SIZE(), since length is the allocated length in the kernel, which may be more, and bytesused is not set by all drivers and may be less if part of the frame was lost. Instead, use the calculated piximage size. Fixes #301718.
-rw-r--r--ChangeLog9
-rw-r--r--sys/v4l2/gstv4l2src.c4
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ff99bd7d..609b18b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2005-06-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * sys/v4l2/gstv4l2src.c: (gst_v4l2src_get):
+ Don't use bytesused/length of a buffer for GST_BUFFER_SIZE(),
+ since length is the allocated length in the kernel, which may
+ be more, and bytesused is not set by all drivers and may be
+ less if part of the frame was lost. Instead, use the calculated
+ piximage size. Fixes #301718.
+
+2005-06-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
* gst/adder/gstadder.c: (gst_adder_link):
Workaround for multi-mp3 case. Seems to work fine (#305658).
Patch based on work from Akos Maroy <darkeye@tyrell.hu>.
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index 45b60bde..b563d9c6 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -907,9 +907,7 @@ gst_v4l2src_get (GstPad * pad)
g_assert (num != -1);
GST_LOG_OBJECT (v4l2src, "buffer %d needs %d writes", num,
v4l2src->need_writes + 1);
- i = v4l2src->pool->buffers[num].buffer.bytesused >
- 0 ? v4l2src->pool->buffers[num].buffer.bytesused : v4l2src->pool->
- buffers[num].length;
+ i = v4l2src->format.fmt.pix.sizeimage;
/* check if this is the last buffer in the queue. If so do a memcpy to put it back asap
to avoid framedrops and deadlocks because of stupid elements */
if (gst_atomic_int_read (&v4l2src->pool->refcount) == v4l2src->breq.count) {