mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
audioaggregator: Accept buffer with no data, but duration and gap flag
These are produced from GAP events by the base class. https://bugzilla.gnome.org/show_bug.cgi?id=784846
This commit is contained in:
parent
023170e2f8
commit
c2b462837b
1 changed files with 12 additions and 0 deletions
|
@ -791,6 +791,18 @@ gst_audio_aggregator_queue_new_buffer (GstAudioAggregator * aagg,
|
|||
pad->priv->position = 0;
|
||||
pad->priv->size = gst_buffer_get_size (inbuf) / bpf;
|
||||
|
||||
if (pad->priv->size == 0) {
|
||||
if (!GST_BUFFER_DURATION_IS_VALID (inbuf) ||
|
||||
!GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_GAP)) {
|
||||
GST_WARNING_OBJECT (pad, "Dropping 0-sized buffer missing either a"
|
||||
" duration or a GAP flag: %" GST_PTR_FORMAT, inbuf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pad->priv->size = gst_util_uint64_scale (GST_BUFFER_DURATION (inbuf), rate,
|
||||
GST_SECOND);
|
||||
}
|
||||
|
||||
if (!GST_BUFFER_PTS_IS_VALID (inbuf)) {
|
||||
if (pad->priv->output_offset == -1)
|
||||
pad->priv->output_offset = aagg->priv->offset;
|
||||
|
|
Loading…
Reference in a new issue