Created
October 10, 2011 06:00
-
-
Save j0sh/1274714 to your computer and use it in GitHub Desktop.
fix audio concatenation in the case of >2 chunks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/sources/thelib/src/protocols/rtp/streaming/outnetrtpudph264stream.cpp b/sources/thelib/src/protocols/rtp/streaming/outnetrtpudph264stream.cpp | |
index 32e36ba..cc7591b 100644 | |
--- a/sources/thelib/src/protocols/rtp/streaming/outnetrtpudph264stream.cpp | |
+++ b/sources/thelib/src/protocols/rtp/streaming/outnetrtpudph264stream.cpp | |
@@ -331,7 +331,7 @@ bool OutNetRTPUDPH264Stream::FeedDataAudioMPEG4Generic_one_by_one(uint8_t *pData | |
} else { | |
//4. This is not the first chunk. Test to see if this is | |
//the last chunk or not | |
- if (totalLength < processedLength + dataLength) { | |
+ if (processedLength + dataLength < totalLength) { | |
//5. This is not the last chunk of the packet. | |
//Test and see if we have any previous data inside the buffer | |
//if we don't, that means we didn't catch the beginning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment