summaryrefslogtreecommitdiffstats
path: root/src/Dmb.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-29 22:09:31 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-29 22:09:31 +0200
commit5132756f09c7a0dafe4644db92718ee3d1a58d6c (patch)
tree094343cedcd9fe8bacb3380e98d96e952b7115ea /src/Dmb.cpp
parent5c3c6d734ff0c57fd3d45746df23b96e0e7fc99e (diff)
parente7ad2e1fab9c51189fdc8b4f2d81f625da9dd422 (diff)
downloaddabmux-5132756f09c7a0dafe4644db92718ee3d1a58d6c.tar.gz
dabmux-5132756f09c7a0dafe4644db92718ee3d1a58d6c.tar.bz2
dabmux-5132756f09c7a0dafe4644db92718ee3d1a58d6c.zip
Merge branch 'next' into servicelinking
Diffstat (limited to 'src/Dmb.cpp')
-rw-r--r--src/Dmb.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Dmb.cpp b/src/Dmb.cpp
index e168b63..92688ea 100644
--- a/src/Dmb.cpp
+++ b/src/Dmb.cpp
@@ -45,7 +45,7 @@ Dmb::Dmb(bool reverse) :
interleaver(12, 17),
encoder(204, 188)
{
- buffer = NULL;
+ buffer = nullptr;
bufferSize = 0;
setReverse(reverse);
}
@@ -53,7 +53,7 @@ encoder(204, 188)
Dmb::~Dmb()
{
- if (buffer != NULL) {
+ if (buffer != nullptr) {
delete[] buffer;
}
}
@@ -93,7 +93,7 @@ int Dmb::encode(
char* output = reinterpret_cast<char*>(dataOut);
if (bufferSize < sizeIn + 204) {
- if (buffer != NULL) {
+ if (buffer != nullptr) {
delete[] buffer;
}
unsigned char* oldBuffer = buffer;
@@ -263,9 +263,9 @@ int Dmb::sync(void* dataIn, unsigned long sizeIn)
char* sync = input;
unsigned long size = sizeIn;
- while (sync != NULL) {
+ while (sync != nullptr) {
sync = (char*)memchr(sync, 0x47, size);
- if (sync != NULL) {
+ if (sync != nullptr) {
int offset = sync - input;
if (offset % 12 != 0) {
offset = ((offset / 12) * 12) + 12;