From 0bcc477d46e3a4a5c107ed267e1c864be8d7b2c2 Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Mon, 18 Nov 2013 16:28:39 +0600 Subject: decoder/OggFind.cxx: include stdio.h for SEEK_END definition --- src/decoder/OggFind.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/decoder') diff --git a/src/decoder/OggFind.cxx b/src/decoder/OggFind.cxx index 821f75ca8..65c7fa3ce 100644 --- a/src/decoder/OggFind.cxx +++ b/src/decoder/OggFind.cxx @@ -22,6 +22,8 @@ #include "OggSyncState.hxx" #include "util/Error.hxx" +#include + bool OggFindEOS(OggSyncState &oy, ogg_stream_state &os, ogg_packet &packet) { -- cgit v1.2.3 From 73f45d87d5d3fd078bdf9acd3077e4c8b6a638c9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 23 Nov 2013 18:30:06 +0100 Subject: decoder/{dsf,dsdiff}: eliminate useless assignments --- src/decoder/DsdiffDecoderPlugin.cxx | 5 ++--- src/decoder/DsfDecoderPlugin.cxx | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/decoder') diff --git a/src/decoder/DsdiffDecoderPlugin.cxx b/src/decoder/DsdiffDecoderPlugin.cxx index 347f5b586..a3c0149b9 100644 --- a/src/decoder/DsdiffDecoderPlugin.cxx +++ b/src/decoder/DsdiffDecoderPlugin.cxx @@ -294,7 +294,6 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is, if (!dsdiff_read_chunk_header(decoder, is, chunk_header)) return false; } - chunk_size = 0; } /* done processing chunk headers, process tags if any */ @@ -385,10 +384,10 @@ dsdiff_decode_chunk(Decoder &decoder, InputStream &is, while (chunk_size > 0) { /* see how much aligned data from the remaining chunk fits into the local buffer */ - unsigned now_frames = buffer_frames; size_t now_size = buffer_size; if (chunk_size < (uint64_t)now_size) { - now_frames = (unsigned)chunk_size / frame_size; + unsigned now_frames = + (unsigned)chunk_size / frame_size; now_size = now_frames * frame_size; } diff --git a/src/decoder/DsfDecoderPlugin.cxx b/src/decoder/DsfDecoderPlugin.cxx index 0507f5047..5ef94e647 100644 --- a/src/decoder/DsfDecoderPlugin.cxx +++ b/src/decoder/DsfDecoderPlugin.cxx @@ -240,10 +240,10 @@ dsf_decode_chunk(Decoder &decoder, InputStream &is, while (chunk_size > 0) { /* see how much aligned data from the remaining chunk fits into the local buffer */ - unsigned now_frames = buffer_frames; size_t now_size = buffer_size; if (chunk_size < (uint64_t)now_size) { - now_frames = (unsigned)chunk_size / frame_size; + unsigned now_frames = + (unsigned)chunk_size / frame_size; now_size = now_frames * frame_size; } -- cgit v1.2.3