rtmpsrc: Fix element losing data at the end of buffers

rtmpsrc outputs truncated buffers because, when enough data is
read to fill the buffer, the amount read that time (todo) is set
to zero before it's added to the cumulative buffer size (bsize).
The buffer is then truncated to bsize resulting in lost data.
This patch adds todo to bsize before setting todo to zero.

Fixes #678509
This commit is contained in:
Mike Ruprecht 2012-06-20 17:52:13 -05:00 committed by Sebastian Dröge
parent 8b9a13de96
commit 96b7059d24

View file

@ -345,8 +345,8 @@ gst_rtmp_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer)
todo -= read;
bsize += read;
} else {
todo = 0;
bsize += todo;
todo = 0;
}
GST_LOG (" got size %d", read);
}