diff --git a/subprojects/gst-plugins-bad/ext/wpe/gstwpesrcbin.cpp b/subprojects/gst-plugins-bad/ext/wpe/gstwpesrcbin.cpp index 9dfc19f234..2a9c55a0b2 100644 --- a/subprojects/gst-plugins-bad/ext/wpe/gstwpesrcbin.cpp +++ b/subprojects/gst-plugins-bad/ext/wpe/gstwpesrcbin.cpp @@ -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;