I had a scenario where the frame was too large and the way I was handling it caused issues.
What I would really like to do is be able to increase the size of the frame buffer for future frames if I overrun it once. So I was calling "OutPacketBuffer::increaseMaxSizeTo(fFrameSize);" and tried adding a little bit too it. However, if I call this in the middle of processing a frame, then H264or5VideoRTPSink throws an error on line 252 "Access violation reading location" Specifically: I initially set OutPacketBuffer::maxSize = 600,000 A frame comes in that has a size of 616969, I call OutPacketBuffer::increaseMaxSizeTo(616969) The next time it hits memmove(fTo, &fInputBuffer[fCurDataOffset-numExtraHeaderBytes], numBytesToSend); in H264or5VideoRTPSink there are no problems However, when I encounter another frame larger than 600,000 specifically 601316 (so smaller than the new fMaxSize) then memmove in H264or5VideoRTPSink will throw an exception Is there a way to increase fMaxSize midstream? Here is my code. Thanks! if (fFrameSize > fMaxSize) { fNumTruncatedBytes = fFrameSize - fMaxSize - offset; //OutPacketBuffer::increaseMaxSizeTo(fFrameSize+10); memcpy(fTo, new_byte_pointer, fMaxSize - offset); } else { memcpy(fTo, new_byte_pointer, fFrameSize - offset); } -- Matthew Czarnek
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel