diff options
-rw-r--r-- | src/pad_common.cpp | 7 | ||||
-rw-r--r-- | src/pad_common.h | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/pad_common.cpp b/src/pad_common.cpp index 5ba4c7f..f60b2eb 100644 --- a/src/pad_common.cpp +++ b/src/pad_common.cpp @@ -131,7 +131,8 @@ pad_t* PADPacketizer::GetPAD() { return FlushPAD(); } -void PADPacketizer::WriteAllPADs(int output_fd, int limit) { + +void PADPacketizer::WriteAllPADs(int output_fd, int limit, bool output_sole_fpad) { size_t error_count = 0; size_t error_bytes = 0; @@ -139,8 +140,8 @@ void PADPacketizer::WriteAllPADs(int output_fd, int limit) { for (int i = 0; i != limit; i++) { pad_t* pad = GetPAD(); - // if only F-PAD present, abort - if (pad->back() == FPAD_LEN) { + // if only F-PAD present, abort (if desired) + if (pad->back() == FPAD_LEN && !output_sole_fpad) { delete pad; break; } diff --git a/src/pad_common.h b/src/pad_common.h index c9dd434..a173d9d 100644 --- a/src/pad_common.h +++ b/src/pad_common.h @@ -121,9 +121,7 @@ public: bool QueueFilled(); pad_t* GetPAD(); - - // will be removed, when pull (instead of push) approach is implemented! - void WriteAllPADs(int output_fd, int limit = -1); + void WriteAllPADs(int output_fd, int limit = -1, bool output_sole_fpad = false); static DATA_GROUP* CreateDataGroupLengthIndicator(size_t len); static bool CheckPADLen(size_t len); |