Re: [AVTCORE] [MMUSIC] [Technical Errata Reported] RFC2326 (4199)

Julius Friedman <> Fri, 30 January 2015 18:42 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 976091A017A; Fri, 30 Jan 2015 10:42:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.1
X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id cGjdQJMLrVUs; Fri, 30 Jan 2015 10:42:48 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:400e:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 0D0131A00B9; Fri, 30 Jan 2015 10:42:48 -0800 (PST)
Received: by with SMTP id eu11so55437785pac.13; Fri, 30 Jan 2015 10:42:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=tedrS7lKCbaQOt7e1EMgfKJYUo6LzX5OPuhyXFlCMDo=; b=XhPep/AE4mw7NNYuBob/fwVxmDyyeqffqfQ6owW7c+e347x1aA9IaoTFlDwWJHI4ih rx/g0DExE+Yp/Jf2XGsvQN0yDfA+bSnFhCRWy+0yoqVtYtqag6KY2+itwFF5PFq2NDQw L5VsWNuQuEO92iMHjPo8a7UV/Ze8DyUYBBNMqDRzl8+8qm/U4DUdy6+m37wPJ4ofQlu8 ODs0GS6MAuRi75ZduidbtxyeUD4hrgufWS20s8supaW3moex+l+HIePN6tbi8IzYb1kL 8w9qQnfFKOYLAZr00nXEuVrcPuXJlbE2DsWC4tML7L6BprLOQNXCuHSKEhLxly9xIA/O q7vg==
MIME-Version: 1.0
X-Received: by with SMTP id ne1mr10763220pbc.49.1422643367278; Fri, 30 Jan 2015 10:42:47 -0800 (PST)
Received: by with HTTP; Fri, 30 Jan 2015 10:42:47 -0800 (PST)
In-Reply-To: <>
References: <> <> <> <>
Date: Fri, 30 Jan 2015 13:42:47 -0500
Message-ID: <>
From: Julius Friedman <>
To: Magnus Westerlund <>,,
Content-Type: multipart/alternative; boundary="e89a8fb208e88c7f10050de2f8dd"
Archived-At: <>
Subject: Re: [AVTCORE] [MMUSIC] [Technical Errata Reported] RFC2326 (4199)
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Audio/Video Transport Core Maintenance <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 30 Jan 2015 18:42:52 -0000

Magnus, Et al,

Then Please, adjust what you / we can control which is the Binary
Interleaved Data.

One simple way would be to at least ensure that the application framing
lengths can be conveyed in a manner consistent with the underlying
transport *AND* with respect to any Blocksize in use on the session.


A binary interleaved frame MAY NOT contain a frame size larger then any
Blocksize in use.

A binary interleaved frame MAY NOT contain less than 12 bytes for RTP or

A binary interleaved frame MUST be verified by using the packet header
fields e.g. (sequence number, timestamp, ssrc)

Instead of skipping the data what should happen is that the data propagated
to the lower layer transport in chunks.

Skipping data is causing the problem which is also defined as an
instruction when a packet is received for an unknown context, which should
again be handled by propagating the data to the lower layer.

I put this logic in my RtpClient implementation and it works well, and
never becomes unframed unless the client intentionally sends a large packet
which hides data inside (which should be related to the packet anyway)

You will see in my unit tests I can receive all of the messages which
overflow most other client implementations cannot due to framing errors.

Using the information given and if needed my code as a reference an
implementation can make much better choices and actually never become
unframed and if they do recovering is always possible.

As a take way from this and final note I suppose that someone has also
looked at using independent TCP on a session which also uses Binary
Interleaved data transport, either for RTSP 2 or 1 if not I will ask anyway.

The reason for this question is I am revising some parts of my server and
client to be more dependent on a 'session' and that session is typically
tied to a underlying 'Transport'..

My question is

"What happens when a client signals in a single session that it wants to
use TCP Interleaved on one media item and Independent on another"

The result for my implementation is that if the end points overlap then the
framing will contain two additional bytes...

How is this being handled or how SHOULD it be so I can adjust my
implementation to allow for it as such.

I can see how it would work if the end points didn't overlap, the protocol
wouldn't have the RTSP Binary Interleaved header for the media flows using
the independent transport, correct?

But if and when they DO how is that handled?

Should it not be allowed that Binary Interleaved Transfer and Independent
transfer occur in the same session?

If that is the case then what about Binary (TCP/RTP/AVP) and (UDP/)RTP/AVP,
can they occur in the same session? If not why and where does one make that
determination given the information in the RFC either 2326 or BIZ).

I allow for this in my implementation as well and there is no issue (but
caused me to notice that the Session is still active when TEARDOWN occurs
and hence why I filled the other erratum).


On Fri, Jan 30, 2015 at 5:41 AM, Magnus Westerlund <> wrote:

> Hi,
> I would still prefer that this discussion was done on the mailing list.
> The content of the Errata is formal broken. But, lets us not care about
> that.
> As I have written before, I still don't see how we can make the change
> Julius proposes even to RTSP 2.0. The core of the proposal to address
> this would make so that $ can only occur as starting point of an
> interleaved binary datagram. That appears impossible to me as the URI
> format for example do allow $ to occur in various parts. Putting in
> escaping at all these places at this stage will also be problematic.
> Yes, it is sub-optimal it will force clients or server to close the RTSP
> message transport if they become out of synch with message boundaries.
> So, in conclusion, I don't see how we can make any corrections or
> improvements on this.
> Cheers
> Magnus
> On 2015-01-30 04:30, Julius Friedman wrote:
> > I wrote in about that in a later email.
> >
> > Do you need my comments on that again?
> >
> > This issue is real and does need to be addressed,  either by using
> > hexadecimal notation in all header fields or otherwise by checking the
> > data using the timestamp and sequence numbers of the packets.
> >
> > Invalid packets (length or otherwise) and packets with no context are
> > also issues I ha e brought up.
> >
> > This is much worse when independent TCP is used if used with interleaved
> > transport in 1.0 as allowed because even though $ was the worst choice
> > based for a framing value it allows something better then what is
> > required when NO framing at all is used and every read has to be
> > verified to be in sync using the protocol level fields such as timestamp
> > and sequence numbers.
> >
> > I have already addressed this in my software as well if reference is
> > needed.
> >
> > Thanks,
> > Julius
> >
> > On Jan 29, 2015 10:18 PM, "Dale R. Worley" <
> > <>> wrote:
> >
> >     Taking a first look at the erratum, two things occur to me:
> >
> >     The erratum quotes a large chunk of the text of section 4 in both the
> >     "says" and "should say" sections.  IMO the duplicated text should
> have
> >     not been put in either, and instead just the changed part, the
> insertion
> >     of:
> >
> >         *Please note the hexadecimal octet 0x36 should not be included
> >     in any
> >         part of a RTSP message, if present it should be replaced with
> binary
> >         escaped sequence as defined in: <consensus>*.
> >
> >     should have been mentioned in "should say".
> >
> >     The second item is that the proposed addition clearly is not what was
> >     intended.  The text says "the hexadecimal octet 0x36", which is the
> >     ASCII code for the digit "6".  What was intended was "the octet 36",
> >     which is the ASCII code for the character '$'.
> >
> >     Dale
> >
> --
> Magnus Westerlund
> ----------------------------------------------------------------------
> Services, Media and Network features, Ericsson Research EAB/TXM
> ----------------------------------------------------------------------
> Ericsson AB                 | Phone  +46 10 7148287
> Färögatan 6                 | Mobile +46 73 0949079
> SE-164 80 Stockholm, Sweden | mailto:
> ----------------------------------------------------------------------