aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/mp4_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:03:39 +0200
committerMax Kellermann <max@duempel.org>2008-10-08 11:03:39 +0200
commitb084bc28ede5d397e88a4e2bdad8c07a55069589 (patch)
treed61d58cc73ed7d591df05fee2f4a48682e8d9c8c /src/inputPlugins/mp4_plugin.c
parent71351160b1b6fd4203f27f9159ae39a476483e1a (diff)
downloadmpd-b084bc28ede5d397e88a4e2bdad8c07a55069589.tar.gz
mpd-b084bc28ede5d397e88a4e2bdad8c07a55069589.tar.xz
mpd-b084bc28ede5d397e88a4e2bdad8c07a55069589.zip
use the "bool" data type instead of "int"
"bool" should be used in C99 programs for boolean values.
Diffstat (limited to 'src/inputPlugins/mp4_plugin.c')
-rw-r--r--src/inputPlugins/mp4_plugin.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c
index 1a4c495d6..6a2d167b2 100644
--- a/src/inputPlugins/mp4_plugin.c
+++ b/src/inputPlugins/mp4_plugin.c
@@ -103,12 +103,12 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream)
unsigned int initial = 1;
float *seekTable;
long seekTableEnd = -1;
- int seekPositionFound = 0;
+ bool seekPositionFound = false;
long offset;
uint16_t bitRate = 0;
- int seeking = 0;
+ bool seeking = false;
double seek_where = 0;
- int initialized = 0;
+ bool initialized = false;
mp4cb = xmalloc(sizeof(mp4ff_callback_t));
mp4cb->read = mp4_inputStreamReadCallback;
@@ -189,7 +189,7 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream)
for (sampleId = 0; sampleId < numSamples; sampleId++) {
if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_SEEK) {
- seeking = 1;
+ seeking = true;
seek_where = decoder_seek_where(mpd_decoder);
}
@@ -219,10 +219,10 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream)
file_time += ((float)dur) / scale;
if (seeking && file_time > seek_where)
- seekPositionFound = 1;
+ seekPositionFound = true;
if (seeking && seekPositionFound) {
- seekPositionFound = 0;
+ seekPositionFound = false;
decoder_clear(mpd_decoder);
seeking = 0;
decoder_command_finished(mpd_decoder);
@@ -259,7 +259,7 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream)
audio_format.channels = frameInfo.channels;
decoder_initialized(mpd_decoder, &audio_format,
total_time);
- initialized = 1;
+ initialized = true;
}
if (channels * (unsigned long)(dur + offset) > frameInfo.samples) {