[vlc-devel] [PATCH] converter/format: fix payload size

Zhao Zhili quinkblack at foxmail.com
Wed Apr 21 04:10:40 UTC 2021


---
 modules/audio_filter/converter/format.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/audio_filter/converter/format.c b/modules/audio_filter/converter/format.c
index fe57dc5fc2..800f5eb139 100644
--- a/modules/audio_filter/converter/format.c
+++ b/modules/audio_filter/converter/format.c
@@ -415,6 +415,7 @@ static block_t *Fl64toFl32(filter_t *filter, block_t *b)
     float  *dst = (float *)src;
     for (size_t i = b->i_buffer / 8; i--;)
         *(dst++) = *(src++);
+    b->i_buffer /= 2;
 
     VLC_UNUSED(filter);
     return b;
@@ -435,6 +436,7 @@ static block_t *Fl64toS32(filter_t *filter, block_t *b)
         else
             *(dst++) = lround(s);
     }
+    b->i_buffer /= 2;
     VLC_UNUSED(filter);
     return b;
 }
-- 
2.25.1



More information about the vlc-devel mailing list