mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
audio: properly handle clipping of empty buffer
This commit is contained in:
parent
d73dcb6af3
commit
162433795a
1 changed files with 4 additions and 0 deletions
|
@ -78,6 +78,10 @@ gst_audio_buffer_clip (GstBuffer * buffer, GstSegment * segment, gint rate,
|
||||||
trim = 0;
|
trim = 0;
|
||||||
osize = size = gst_buffer_get_size (buffer);
|
osize = size = gst_buffer_get_size (buffer);
|
||||||
|
|
||||||
|
/* no data, nothing to clip */
|
||||||
|
if (!size)
|
||||||
|
return buffer;
|
||||||
|
|
||||||
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
||||||
GST_DEBUG ("timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (timestamp));
|
GST_DEBUG ("timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (timestamp));
|
||||||
if (GST_BUFFER_DURATION_IS_VALID (buffer)) {
|
if (GST_BUFFER_DURATION_IS_VALID (buffer)) {
|
||||||
|
|
Loading…
Reference in a new issue