[jitsi-dev] [libjitsi] Outgoing G722 RTP packets have incorrect RTP timestamp (#57)

First G722 rtp packet has timestamp 2^32-1.

I found the fix in jitsi repo for bug #872 (see below), and saw that "outputFormat =" is missing for G722 in (src/org/jitsi/impl/neomedia/codec/audio/g722/JNIEncoderImpl.java:118). I can not build and verify this. So maybe someone is able to try this.

regards,
chris.

diff --git a/src/net/java/sip/communicator/impl/neomedia/codec/audio/speex/JNIEncoder.java b/s
index f0cd63e..3804bfe 100644
--- a/src/net/java/sip/communicator/impl/neomedia/codec/audio/speex/JNIEncoder.java
+++ b/src/net/java/sip/communicator/impl/neomedia/codec/audio/speex/JNIEncoder.java
@@ -413,7 +413,7 @@ public class JNIEncoder
         {
             AudioFormat outputAudioFormat = (AudioFormat) outputFormat;

- setOutputFormat(
+ outputFormat = setOutputFormat(
                 new AudioFormat(
                             outputAudioFormat.getEncoding(),
                             outputAudioFormat.getSampleRate(),
@@ -425,6 +425,8 @@ public class JNIEncoder
                             outputAudioFormat.getFrameRate(),
                             outputAudioFormat.getDataType())
                         {
+ private static final long serialVersionUID = 0L;

···

+
                             @Override
                             public long computeDuration(long length)
                             {

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/57

I think that a similar change to the G722 encoder makes sense, since we don't want to return a stale value. But I don't know if this will have an effect the RTP timestamps.

In anyway, [according to RFC3550](http://tools.ietf.org/html/rfc3550#page-15), the initial timestamp should be chosen at random, so I don't see how changing it from 2^32-1 to 0 will solve any issues.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/57#issuecomment-138606903

It seems that ignoring this faulty packet on the remote side solves it for
linphone, which uses libortp. We had the issue that audio playback was
muted for the first approximately 8 seconds.

···

Am 08.09.2015 5:52 nachm. schrieb "bgrozev" <notifications@github.com>:

I think that a similar change to the G722 encoder makes sense, since we
don't want to return a stale value. But I don't know if this will have an
effect the RTP timestamps.

In anyway, according to RFC3550
<http://tools.ietf.org/html/rfc3550#page-15>, the initial timestamp
should be chosen at random, so I don't see how changing it from 2^32-1 to 0
will solve any issues.


Reply to this email directly or view it on GitHub
<https://github.com/jitsi/libjitsi/issues/57#issuecomment-138606903>.

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/57#issuecomment-138610559

Sounds like a problem on the linphone side. Using 2^32-1 for the timestamp does not make a packet faulty.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/57#issuecomment-138727218

Closed #57 via 567d817b3dee4280c33f0a2ce0eb5410f5a0b76b.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/57#event-426227005