audiomixer: Do not try to resize a buffer to a negative size on EOS

This commit is contained in:
Thibault Saunier 2014-11-27 16:43:39 +01:00
parent 7e75f21a41
commit d5a171cae9

View file

@ -1500,8 +1500,9 @@ gst_audiomixer_aggregate (GstAggregator * agg)
"Last buffer is incomplete: %" G_GUINT64_FORMAT " <= %" "Last buffer is incomplete: %" G_GUINT64_FORMAT " <= %"
G_GUINT64_FORMAT, max_offset, next_offset); G_GUINT64_FORMAT, max_offset, next_offset);
next_offset = max_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); next_timestamp = gst_util_uint64_scale (next_offset, GST_SECOND, rate);
} }
} }