aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Pöschel <github@basicmaster.de>2017-08-07 22:54:21 +0200
committerStefan Pöschel <github@basicmaster.de>2017-08-07 22:54:21 +0200
commitf0d5d85074cd696b5653c6924fbe2281dea05e41 (patch)
treecf2c87227dfe88b01bfd2ef1621a21d806163981
parent62409ce26f1fd41d915c4022088fcb8b133ae6c6 (diff)
downloadODR-AudioEnc-f0d5d85074cd696b5653c6924fbe2281dea05e41.tar.gz
ODR-AudioEnc-f0d5d85074cd696b5653c6924fbe2281dea05e41.tar.bz2
ODR-AudioEnc-f0d5d85074cd696b5653c6924fbe2281dea05e41.zip
Rename PAD read result var to prevent confusion
-rw-r--r--src/odr-audioenc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp
index edb98f7..ca4faec 100644
--- a/src/odr-audioenc.cpp
+++ b/src/odr-audioenc.cpp
@@ -967,23 +967,23 @@ int main(int argc, char *argv[])
AACENC_BufDesc in_buf = { 0 }, out_buf = { 0 };
// --------------- Read data from the PAD fifo
- int ret;
+ int pad_ret;
if (padlen != 0) {
- ret = read(pad_fd, pad_buf, padlen + 1);
+ pad_ret = read(pad_fd, pad_buf, padlen + 1);
}
else {
- ret = 0;
+ pad_ret = 0;
}
- if(ret < 0 && errno == EAGAIN) {
+ if(pad_ret < 0 && errno == EAGAIN) {
// If this condition passes, there is no data to be read
in_buf.numBufs = 1; // Samples;
}
- else if(ret >= 0) {
+ else if(pad_ret >= 0) {
// Otherwise, you're good to go and buffer should contain "count" bytes.
in_buf.numBufs = 2; // Samples + Data;
- if (ret > 0)
+ if (pad_ret > 0)
status |= STATUS_PAD_INSERTED;
}
else {
@@ -1158,7 +1158,7 @@ int main(int argc, char *argv[])
//
int in_identifier[] = {IN_AUDIO_DATA, IN_ANCILLRY_DATA};
int out_identifier = OUT_BITSTREAM_DATA;
- const int calculated_padlen = ret > 0 ? pad_buf[padlen] : 0;
+ const int calculated_padlen = pad_ret > 0 ? pad_buf[padlen] : 0;
const int subchannel_index = bitrate / 8;
void *in_ptr[2], *out_ptr;
@@ -1205,7 +1205,7 @@ int main(int argc, char *argv[])
}
else if (selected_encoder == encoder_selection_t::toolame_dab) {
int calculated_padlen = 0;
- if (ret == padlen + 1) {
+ if (pad_ret == padlen + 1) {
calculated_padlen = pad_buf[padlen];
if (calculated_padlen <= 2) {
stringstream ss;