mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
interaudiosrc: Add audio meta to buffers containing non-interleaved samples
Without this a downstream audioconverter wouldn't be able to map the GstAudioBuffer prior to conversion. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5324>
This commit is contained in:
parent
324d5c6460
commit
46dbe2a372
1 changed files with 6 additions and 0 deletions
|
@ -412,6 +412,12 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
|
||||||
}
|
}
|
||||||
n = period_samples;
|
n = period_samples;
|
||||||
|
|
||||||
|
/* audioconvert expects an audio meta for planar layout audio inputs. */
|
||||||
|
if (GST_AUDIO_INFO_LAYOUT (&interaudiosrc->info) ==
|
||||||
|
GST_AUDIO_LAYOUT_NON_INTERLEAVED) {
|
||||||
|
gst_buffer_add_audio_meta (buffer, &interaudiosrc->info, n, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
GST_BUFFER_OFFSET (buffer) = interaudiosrc->n_samples;
|
GST_BUFFER_OFFSET (buffer) = interaudiosrc->n_samples;
|
||||||
GST_BUFFER_OFFSET_END (buffer) = interaudiosrc->n_samples + n;
|
GST_BUFFER_OFFSET_END (buffer) = interaudiosrc->n_samples + n;
|
||||||
GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
|
GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
|
||||||
|
|
Loading…
Reference in a new issue