From 4f288a52344eee6c642e32d3877d72aafc6b9d0a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 31 Oct 2013 19:15:12 +0100 Subject: [PATCH] wavpackenc: Fix writing of MD5 sums and other metadata blocks These don't have the FINAL_BLOCK flag set. --- ext/wavpack/gstwavpackenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/wavpack/gstwavpackenc.c b/ext/wavpack/gstwavpackenc.c index eccafa1..cb69739 100644 --- a/ext/wavpack/gstwavpackenc.c +++ b/ext/wavpack/gstwavpackenc.c @@ -590,7 +590,9 @@ gst_wavpack_enc_push_block (void *id, void *data, int32_t count) enc->pending_offset = wph.block_index; } - if (!(wph.flags & FINAL_BLOCK)) + /* Is this the not-final block of multi-channel data? If so, just + * accumulate and return here. */ + if (!(wph.flags & FINAL_BLOCK) && ((block[32] & ID_OPTIONAL_DATA) == 0)) return TRUE; buffer = enc->pending_buffer; -- 2.7.4