mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
audio: change buffer timestamp when clipping even if data hasn't been trimmed
https://bugzilla.gnome.org/show_bug.cgi?id=708952
This commit is contained in:
parent
057a44899e
commit
dbaf1bf0a3
1 changed files with 9 additions and 1 deletions
|
@ -185,8 +185,16 @@ gst_audio_buffer_clip (GstBuffer * buffer, GstSegment * segment, gint rate,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trim == 0 && size == osize) {
|
if (trim == 0 && size == osize) {
|
||||||
/* nothing changed */
|
|
||||||
ret = buffer;
|
ret = buffer;
|
||||||
|
|
||||||
|
if (GST_BUFFER_TIMESTAMP (ret) != timestamp) {
|
||||||
|
ret = gst_buffer_make_writable (ret);
|
||||||
|
GST_BUFFER_TIMESTAMP (ret) = timestamp;
|
||||||
|
}
|
||||||
|
if (GST_BUFFER_DURATION (ret) != duration) {
|
||||||
|
ret = gst_buffer_make_writable (ret);
|
||||||
|
GST_BUFFER_DURATION (ret) = duration;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Get a writable buffer and apply all changes */
|
/* Get a writable buffer and apply all changes */
|
||||||
GST_DEBUG ("trim %" G_GSIZE_FORMAT " size %" G_GSIZE_FORMAT, trim, size);
|
GST_DEBUG ("trim %" G_GSIZE_FORMAT " size %" G_GSIZE_FORMAT, trim, size);
|
||||||
|
|
Loading…
Reference in a new issue