[FFmpeg-devel] [PATCH] RTSP-MS 4/15: blocksize detection

Luca Barbato lu_zero
Thu Jan 8 11:16:58 CET 2009

Ronald S. Bultje wrote:
> Hi,
> attached patch parses the "Blocksize" field in the RTSP reply header
> in response to each SETUP request (one per m= line in the SDP). This
> is the maximum amount of data contained in a single RTP packet
> transmitted by the server, and can be larger than
> RTP_MAX_PACKET_LENGTH (it's one of those things where it's not 100%
> RTP-compliant). I'm parsing it, taking the max Blocksize value and
> then the max between this "max. blocksize value" and
> RTP_MAX_PACKET_LENGTH to determine the buffer size for reading
> individual RTP packets.

Just for reference

12.7 Blocksize

    This request header field is sent from the client to the media server
    asking the server for a particular media packet size. This packet
    size does not include lower-layer headers such as IP, UDP, or RTP.
    The server is free to use a blocksize which is lower than the one
    requested. The server MAY truncate this packet size to the closest
    multiple of the minimum, media-specific block size, or override it
    with the media-specific size if necessary. The block size MUST be a
    positive decimal number, measured in octets. The server only returns
    an error (416) if the value is syntactically invalid.

Sending the header according the spec makes the ms server behave 



Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC

More information about the ffmpeg-devel mailing list