summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2014-11-27 16:43:39 +0100
committerTim-Philipp Müller <tim@centricular.com>2014-12-12 20:07:35 +0000
commit2b46e1f97549049c6df1c633e80cf98382d0112f (patch)
tree0fb639154e0b723fbe8126d37dc5c8f954e00cb3
parentdc31d9ad8c93edbe48162acf94242d53cd6f5d1b (diff)
downloadgstreamer-plugins-bad-2b46e1f97549049c6df1c633e80cf98382d0112f.tar.gz
audiomixer: Do not try to resize a buffer to a negative size on EOS
-rw-r--r--gst/audiomixer/gstaudiomixer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/audiomixer/gstaudiomixer.c b/gst/audiomixer/gstaudiomixer.c
index cf3f707ac..4202f0016 100644
--- a/gst/audiomixer/gstaudiomixer.c
+++ b/gst/audiomixer/gstaudiomixer.c
@@ -1840,8 +1840,9 @@ gst_audiomixer_collected (GstCollectPads * pads, gpointer user_data)
"Last buffer is incomplete: %" G_GUINT64_FORMAT " <= %"
G_GUINT64_FORMAT, max_offset, next_offset);
next_offset = max_offset;
+ if (next_offset > audiomixer->offset)
+ gst_buffer_resize (outbuf, 0, (next_offset - audiomixer->offset) * bpf);
- gst_buffer_resize (outbuf, 0, (next_offset - audiomixer->offset) * bpf);
next_timestamp = gst_util_uint64_scale (next_offset, GST_SECOND, rate);
}
}