From 96b7059d242421cba1dde21b841f4b95fb3aad0c Mon Sep 17 00:00:00 2001 From: Mike Ruprecht Date: Wed, 20 Jun 2012 17:52:13 -0500 Subject: [PATCH] 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 --- ext/rtmp/gstrtmpsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/rtmp/gstrtmpsrc.c b/ext/rtmp/gstrtmpsrc.c index be94bae7d1..7d3ccaf34d 100644 --- a/ext/rtmp/gstrtmpsrc.c +++ b/ext/rtmp/gstrtmpsrc.c @@ -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); }