diff options
author | 2012-02-16 18:09:56 +0000 | |
---|---|---|
committer | 2012-02-16 18:09:56 +0000 | |
commit | a825e9730d32de2f78a6ebdd39e5956898ca150e (patch) | |
tree | a669e02cce7d4e89672b2d8406e88e633e773fa1 /src | |
parent | b4c36e74e03a42994a4cf2435a5fd8ef1d03c624 (diff) |
Fix blocksize for FLAC encoder.
Fix writing uncompressed CHDs via createhd.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/util/chd.c | 2 | ||||
-rw-r--r-- | src/lib/util/chdcodec.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/util/chd.c b/src/lib/util/chd.c index dfb870f849c..1ccf300a075 100644 --- a/src/lib/util/chd.c +++ b/src/lib/util/chd.c @@ -255,7 +255,7 @@ inline UINT64 chd_file::file_append(const void *source, UINT32 length, UINT32 al { UINT32 bytes_to_write = MIN(sizeof(buffer), delta); UINT32 count = core_fwrite(m_file, buffer, bytes_to_write); - if (count != length) + if (count != bytes_to_write) throw CHDERR_WRITE_ERROR; delta -= bytes_to_write; } diff --git a/src/lib/util/chdcodec.c b/src/lib/util/chdcodec.c index 5b37e8154e6..c09f32834bb 100644 --- a/src/lib/util/chdcodec.c +++ b/src/lib/util/chdcodec.c @@ -1123,7 +1123,7 @@ chd_flac_compressor::chd_flac_compressor(chd_file &chd, bool lossy, bool bigendi // configure the encoder m_encoder.set_sample_rate(44100); m_encoder.set_num_channels(2); - m_encoder.set_block_size(chd.hunk_bytes()); + m_encoder.set_block_size(chd.hunk_bytes() / 4); m_encoder.set_strip_metadata(true); } |