decoderstack: Fix incorrect end sample number.
PulseView was invoking srd_session_send() with an incorrect end
sample number (and thus incorrect sample count).
Example 1:
5000000 samples, unitsize 1
Before the fix:
srd: Calling decode(), start sample 0, end sample
5000000 (
5000000 samples, 4096 bytes, unitsize = 1), instance am230x.
srd: Calling decode(), start sample 4096, end sample
5004096 (
5000000 samples, 4096 bytes, unitsize = 1), instance am230x.
srd: Calling decode(), start sample 8192, end sample
5008192 (
5000000 samples, 4096 bytes, unitsize = 1), instance am230x.
[...]
srd: Calling decode(), start sample
4988928, end sample
9988928 (
5000000 samples, 4096 bytes, unitsize = 1), instance am230x.
srd: Calling decode(), start sample
4993024, end sample
9993024 (
5000000 samples, 4096 bytes, unitsize = 1), instance am230x.
srd: Calling decode(), start sample
4997120, end sample
9997120 (
5000000 samples, 2880 bytes, unitsize = 1), instance am230x.
After the fix:
srd: Calling decode(), start sample 0, end sample 4096 (4096 samples, 4096 bytes, unitsize = 1), instance am230x.
srd: Calling decode(), start sample 4096, end sample 8192 (4096 samples, 4096 bytes, unitsize = 1), instance am230x.
srd: Calling decode(), start sample 8192, end sample 12288 (4096 samples, 4096 bytes, unitsize = 1), instance am230x.
[...]
srd: Calling decode(), start sample
4988928, end sample
4993024 (4096 samples, 4096 bytes, unitsize = 1), instance am230x.
srd: Calling decode(), start sample
4993024, end sample
4997120 (4096 samples, 4096 bytes, unitsize = 1), instance am230x.
srd: Calling decode(), start sample
4997120, end sample
5000000 (2880 samples, 2880 bytes, unitsize = 1), instance am230x.
Example 2: 5000 samples, unitsize 5
Before the fix:
srd: Calling decode(), start sample 0, end sample 5000 (5000 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 819, end sample 5819 (5000 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 1638, end sample 6638 (5000 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 2457, end sample 7457 (5000 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 3276, end sample 8276 (5000 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 4095, end sample 9095 (5000 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 4914, end sample 9914 (5000 samples, 430 bytes, unitsize = 5), instance z80.
After the fix:
srd: Calling decode(), start sample 0, end sample 819 (819 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 819, end sample 1638 (819 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 1638, end sample 2457 (819 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 2457, end sample 3276 (819 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 3276, end sample 4095 (819 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 4095, end sample 4914 (819 samples, 4095 bytes, unitsize = 5), instance z80.
srd: Calling decode(), start sample 4914, end sample 5000 (86 samples, 430 bytes, unitsize = 5), instance z80.