mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 00:45:56 +00:00
wpesrcbin: Fix audio metadata
The meta expects the number of samples in the buffer, not the total size. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5531>
This commit is contained in:
parent
7d64943b9d
commit
7fd7917c78
1 changed files with 3 additions and 1 deletions
|
@ -284,7 +284,9 @@ gst_wpe_src_push_audio_buffer (GstWpeSrc* src, guint32 id, guint64 size)
|
|||
gpointer data = mmap (0, size, PROT_READ, MAP_PRIVATE, audio_pad->fd, 0);
|
||||
buffer = gst_buffer_new_memdup (data, size);
|
||||
munmap (data, size);
|
||||
gst_buffer_add_audio_meta (buffer, &audio_pad->info, size, NULL);
|
||||
gst_buffer_add_audio_meta(
|
||||
buffer, &audio_pad->info,
|
||||
size / GST_AUDIO_INFO_BPF(&audio_pad->info), NULL);
|
||||
|
||||
audio_pad->buffer_time = gst_element_get_current_running_time (GST_ELEMENT (src));
|
||||
GST_BUFFER_DTS (buffer) = audio_pad->buffer_time;
|
||||
|
|
Loading…
Reference in a new issue