diff --git a/ChangeLog b/ChangeLog index ebc1854f6..1d37b7fa6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-04-07 Moritz Bunkus + * mkvextract: bug fix: WAVPACK extraction did not update the + "number of samples" header field. Patch by Steve Lhomme (see + AUTHORS). + * mkvmerge: bug fix: RealMedia files contain a "FPS" field in their track headers. Unfortunately this field does not always contain the actual FPS of a video track but the maximum number of diff --git a/src/extract/xtr_wav.cpp b/src/extract/xtr_wav.cpp index 3b036a5df..6784b6fed 100644 --- a/src/extract/xtr_wav.cpp +++ b/src/extract/xtr_wav.cpp @@ -211,5 +211,12 @@ xtr_wavpack4_c::handle_block(KaxBlock &block, void xtr_wavpack4_c::finish_file() { - delete corr_out; + out->setFilePointer(12); + out->write_uint32_le(number_of_samples); + + if (NULL != corr_out) { + corr_out->setFilePointer(12); + corr_out->write_uint32_le(number_of_samples); + delete corr_out; + } } diff --git a/src/extract/xtr_wav.h b/src/extract/xtr_wav.h index 2f9e1161d..1aadc2410 100644 --- a/src/extract/xtr_wav.h +++ b/src/extract/xtr_wav.h @@ -32,7 +32,7 @@ public: class xtr_wavpack4_c: public xtr_base_c { public: - uint64_t number_of_samples; + uint32_t number_of_samples; int extract_blockadd_level; binary version[2]; mm_file_io_c *corr_out;