[Red5devs] possible bug in FileConsumer.java
Jack Punt
jpjj05-red5 at yahoo.com
Thu Oct 30 22:12:07 PST 2008
Trying to discover why i'm occasionally getting weird timestamps, i was reading the code and noticed a low-grade potential bug in org/red5/server/stream/consumer/FileConsumer.java where it says:
public void pushMessage(IPipe pipe, IMessage message) throws IOException {
if (message instanceof ResetMessage) {
startTimestamp = -1;
offset += lastTimestamp;
return;
} ...
Observe that if multiple ResetMessages were to arrive without any intervening media packets, that the offset would continue to increase.
Seems to me that after: offset += lastTimestamp; lastTimestamp=0; would be advised.
I don't know the semantics of the ResetMessage, so maybe it could never happen...?
It is also strange that the media packet coming just *before* the Reset and the media packet coming just *after* the Reset will get the *same* timestamp, independent of the original timestamps in the media packets. Is this the expected/intended result?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5devs_osflash.org/attachments/20081030/e7ac099b/attachment.html>
More information about the Red5devs
mailing list