2013-05-27 20:16:09 +00:00
|
|
|
--- flac-1.2.99_git201305252226.orig/src/libFLAC/metadata_iterators.c
|
|
|
|
+++ flac-1.2.99_git201305252226/src/libFLAC/metadata_iterators.c
|
|
|
|
@@ -420,10 +420,10 @@ static FLAC__bool simple_iterator_prime_
|
2011-11-20 08:40:13 +00:00
|
|
|
|
|
|
|
FLAC__ASSERT(0 != iterator);
|
|
|
|
|
2013-05-27 20:16:09 +00:00
|
|
|
- if(read_only || 0 == (iterator->file = flac_fopen(iterator->filename, "r+b"))) {
|
|
|
|
+ if(read_only || 0 == (iterator->file = flac_fopen(iterator->filename, "r+be"))) {
|
2011-11-20 08:40:13 +00:00
|
|
|
iterator->is_writable = false;
|
|
|
|
if(read_only || errno == EACCES) {
|
2013-05-27 20:16:09 +00:00
|
|
|
- if(0 == (iterator->file = flac_fopen(iterator->filename, "rb"))) {
|
|
|
|
+ if(0 == (iterator->file = flac_fopen(iterator->filename, "rbe"))) {
|
2011-11-20 08:40:13 +00:00
|
|
|
iterator->status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE;
|
|
|
|
return false;
|
|
|
|
}
|
2013-05-27 20:16:09 +00:00
|
|
|
--- flac-1.2.99_git201305252226.orig/src/libFLAC/stream_decoder.c
|
|
|
|
+++ flac-1.2.99_git201305252226/src/libFLAC/stream_decoder.c
|
|
|
|
@@ -606,7 +606,7 @@ static FLAC__StreamDecoderInitStatus ini
|
2011-11-20 08:40:13 +00:00
|
|
|
if(0 == write_callback || 0 == error_callback)
|
|
|
|
return decoder->protected_->state = FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS;
|
|
|
|
|
2013-05-27 20:16:09 +00:00
|
|
|
- file = filename? flac_fopen(filename, "rb") : stdin;
|
|
|
|
+ file = filename? flac_fopen(filename, "rbe") : stdin;
|
2011-11-20 08:40:13 +00:00
|
|
|
|
|
|
|
if(0 == file)
|
|
|
|
return FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE;
|
2013-05-27 20:16:09 +00:00
|
|
|
--- flac-1.2.99_git201305252226.orig/src/libFLAC/stream_encoder.c
|
|
|
|
+++ flac-1.2.99_git201305252226/src/libFLAC/stream_encoder.c
|
|
|
|
@@ -1250,7 +1250,7 @@ static FLAC__StreamEncoderInitStatus ini
|
2011-11-20 08:40:13 +00:00
|
|
|
if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED)
|
|
|
|
return FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED;
|
|
|
|
|
2013-05-27 20:16:09 +00:00
|
|
|
- file = filename? flac_fopen(filename, "w+b") : stdout;
|
|
|
|
+ file = filename? flac_fopen(filename, "w+be") : stdout;
|
2011-11-20 08:40:13 +00:00
|
|
|
|
|
|
|
if(file == 0) {
|
|
|
|
encoder->protected_->state = FLAC__STREAM_ENCODER_IO_ERROR;
|