| Branch: | Revision:

ffmpeg / libavformat / rtpdec.c @ dfd2a005

History | View | Annotate | Download (25.2 KB)

# Date Author Comment
dfd2a005 01/29/2011 10:55 PM Luca Barbato

Replace dprintf with av_dlog

dprintf clashes with POSIX.1-2008

119cc033 01/25/2011 01:45 AM Diego Elio Pettenò

Make RTPFirstDynamicPayloadHandler static to rtpdec.c

Signed-off-by: Mans Rullgard <>

69ad22c7 01/25/2011 01:37 AM Diego Elio Pettenò

Make ff_realmedia_mp3_dynamic_handler static.

Signed-off-by: Mans Rullgard <>

79d482b1 01/06/2011 11:33 AM Martin Storsjö

rtpdec: Don't set RTP timestamps if they already are set by the depacketizer

For MS-RTSP, we don't always get RTCP packets (never?), so the earlier
timestamping code never wrote anything into pkt->pts. The rtpdec_asf
depacketizer just sets the dts of the packet, so if the generic RTP...

3a1cdcc7 01/01/2011 10:27 PM Martin Storsjö

rtpdec: Emit timestamps for packets before the first RTCP packet, too

Emitted timestamps in each stream start from 0, for the first received
RTP packet. Once an RTCP packet is received, that one is used for
sync, emitting timestamps that fit seamlessly into the earlier ones....

bbd8f547 12/15/2010 09:06 PM Martin Storsjö

rtsp: Don't set the RTP time base from the sample rate if no sample rate is set

This also reverts SVN rev 26016, which incorrectly overwrote the time base
with 90 kHz for all streams, regardless of what was set by the SDP parsing.

The stream that triggered the fix in 26016 still works after this commit....

a4a3bade 12/15/2010 05:16 PM Luca Barbato

Reinstate default time_base for rtp streams

The generic default is 0/0 and that obviously triggers once the value is used.

Originally committed as revision 26016 to svn://

86b6e387 12/07/2010 01:29 PM Martin Storsjö

rtsp/rtpdec: Set the AVStream time_base directly in rtsp when it is known

This fixes cases where the RTP time base and the sample rate of the stream
differ. Previously, the AVStream time_base was unconditionally set to
the sample rate (which initially was set to one value when parsing the...

2eeefe20 12/07/2010 01:28 PM Martin Storsjö

rtpdec: Handle MP3 in RealRTSP

This fixes playback of a RealRTSP/MP3 URL from the RTSP samples on

Originally committed as revision 25906 to svn://

4838cdab 12/06/2010 12:43 PM Martin Storsjö

rtpdec: Skip padding bytes at the end of packets

Originally committed as revision 25896 to svn://

1e515c42 12/05/2010 07:39 PM Martin Storsjö

rtpdec: Add functions for finding depacketizers by name or payload id

Originally committed as revision 25891 to svn://

35014efc 12/05/2010 07:37 PM Martin Storsjö

rtpdec: Add a dynamic payload handler for the x-Purevoice format, RFC 2658

This fixes roundup issue 2390.

Originally committed as revision 25889 to svn://

946df059 10/15/2010 09:32 PM Martin Storsjö

rtpdec: Return AVERROR for mpegts parsing errors

This indicates that there was no error that needs to be reported to the
caller, so we can move on to parse the next packet immediately, if
available. The only error code that ff_mpegts_parse_packet can return...

65cdee9c 10/13/2010 08:47 AM Martin Storsjö

rtpdec: Don't use the no reordering codepath if there already is a queue

Originally committed as revision 25462 to svn://

ddcf8411 10/13/2010 08:15 AM Martin Storsjö

rtpdec: Handle wrapping seq numbers in has_next_packet properly

Originally committed as revision 25461 to svn://

d678a6fd 10/13/2010 08:14 AM Martin Storsjö

rtpdec: Parse the next packet in the sequence if it is available, if the previous packet didn't return any data

Originally committed as revision 25460 to svn://

91ec7aea 10/13/2010 08:13 AM Martin Storsjö

rtpdec: Return AVERROR if out of data for mpegts, pass returned error codes through

Originally committed as revision 25459 to svn://

f6e138b4 10/13/2010 08:13 AM Martin Storsjö

rtpdec: Don't call the depacketizer to return more data unless it actually said it has more data

It may have returned a negative number for an error (e.g. AVERROR,
if more data is required for it to be able to return a complete packet).

Originally committed as revision 25458 to svn://

4ffff367 10/13/2010 08:12 AM Martin Storsjö

rtpdec: Split out storing of the depacketization return value to a separate function

This makes the code less fragile and easier to understand.

Originally committed as revision 25457 to svn://

b7952ed1 10/08/2010 08:40 AM Martin Storsjö

rtpdec: Set prev_ret properly when parsing more data from mpegts RTP packets

Originally committed as revision 25404 to svn://

45658b74 10/08/2010 07:28 AM Martin Storsjö

rtpdec: Store the previous return value for mpegts when it was -1, too

Originally committed as revision 25403 to svn://

243ac3fd 10/08/2010 07:26 AM Robert Schlabbach

rtpdec: Keep track of the previous return value from rtp_parse_packet_internal for mpegts packets

Patch by Robert Schlabbach, robert_s at gmx dot net

Originally committed as revision 25402 to svn://

9446b4bb 10/06/2010 04:59 PM Robert Schlabbach

rtpdec: Handle RTP header extension

This fixes roundup issue 2270.

Patch by Robert Schlabbach, robert_s at gmx dot net

Originally committed as revision 25372 to svn://

3ece3e4c 10/06/2010 12:42 PM Martin Storsjö

Add RTP depacketization of the X-QT QuickTime format

Originally committed as revision 25371 to svn://

58ee0991 10/01/2010 05:50 PM Martin Storsjö

rtpdec: Reorder received RTP packets according to the seq number

Reordering is enabled only when receiving over UDP.

Originally committed as revision 25294 to svn://

02607418 10/01/2010 05:46 PM Martin Storsjö

rtpdec: Split out the part of rtp_parse_packet that does the parsing of new packets

Originally committed as revision 25293 to svn://

ad4ad27f 10/01/2010 05:43 PM Martin Storsjö

rtsp/rtpdec: Allow rtp_parse_packet to take ownership of the packet buffer

Do the same change for ff_rdt_parse_packet, too, to keep the interfaces

Originally committed as revision 25289 to svn://

0048a2a8 09/15/2010 05:35 PM Martin Storsjö

Handle G.722 in RTP, and all the exceptions mandated in RFC 3551

Originally committed as revision 25125 to svn://

b20359f5 08/29/2010 10:25 AM Josh Allmann

rtsp: Return AVERROR_EOF when all streams have received an RTCP BYE packet

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 24965 to svn://

682d28a9 08/29/2010 10:20 AM Josh Allmann


Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 24964 to svn://

ff328c02 08/29/2010 10:19 AM Josh Allmann

rtpdec: Read RTCP compound packets

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 24963 to svn://

7f3468d3 08/25/2010 09:15 AM Josh Allmann

rtp: Replace hardcoded RTCP packet types with defines

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 24912 to svn://

952139a3 08/23/2010 11:53 AM Luca Abeni

Do not use the server SSRC as client SSRC in the RTP demuxer

Originally committed as revision 24879 to svn://

51291e60 08/16/2010 02:23 PM Josh Allmann

Add RTP depacketization of VP8

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 24798 to svn://

1ddc176e 08/12/2010 09:07 PM Martin Storsjö

Add RTP depacketization of MP4A-LATM

Originally committed as revision 24790 to svn://

965a3ddb 07/30/2010 12:04 PM Martin Storsjö

Remove mostly unnecessary rtpdec_*.h files, store the declarations in one file

Originally committed as revision 24596 to svn://

a59096e4 07/14/2010 12:32 PM Josh Allmann

Add a depacketizer for QDM2

Patch by Josh Allmann, joshua dot allmann at gmail, original code
by Ronald S Bultje.

Originally committed as revision 24236 to svn://

d74c6145 07/14/2010 12:26 PM Martin Storsjö

rtpdec: Allow depacketizers to specify that pkt->pts should be left as AV_NOPTS_VALUE

Originally committed as revision 24234 to svn://

4449df6b 07/01/2010 08:12 PM Josh Allmann

Add RTP depacketization of SVQ3

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23941 to svn://

824535e3 06/28/2010 08:27 PM Josh Allmann

rtpdec: Malloc the fmtp value buffer

This allows very large value strings, needed for xiph extradata.

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23859 to svn://

016bc031 06/28/2010 11:24 AM Josh Allmann

rtpdec: Add generic function for iterating over FMTP configuration lines

This will be used for cleaning up code that is common among RTP depacketizers.

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23847 to svn://

ca937a55 06/25/2010 08:02 AM Josh Allmann

RTSP, rtpdec: Move RTPPayloadData into rtpdec_mpeg4 and remove all references to rtp_payload_data in rtpdec and rtsp

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23772 to svn://

73e6c53e 06/25/2010 08:01 AM Josh Allmann

rtpdec: Move AAC depacketization code in rtpdec to a proper payload handler

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23771 to svn://

9b3788ef 06/25/2010 07:58 AM Josh Allmann

RTSP: Decouple MPEG-4 and AAC specific parts from rtsp.c

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23769 to svn://

5948f822 04/20/2010 07:38 AM Martin Storsjö

Reset RTCP timestamps after seeking, add range start offset to the packets timestamps

If these aren't reset, the timestamps make a huge jump when the next RTCP
is received.

Originally committed as revision 22918 to svn://

2cab6b48 04/20/2010 07:34 AM Martin Storsjö

Revert svn rev 21857, readd first_rtcp_ntp_time in RTPDemuxContext

In order to sync RTP streams that get their initial RTCP timestamp at
different times, propagate the NTP timestamp of the first RTCP packet
to all other streams.

This makes the timestamps of returned packets start at (near) zero instead...

0950e170 04/05/2010 05:26 PM Martin Storsjö


Originally committed as revision 22805 to svn://

0e4b185a 04/05/2010 05:25 PM Martin Storsjö

Fix leaks in the AAC RTP depacketizer

Originally committed as revision 22804 to svn://

06a36faf 04/01/2010 09:40 PM Josh Allmann

Rename rtpdec_theora.[ch] to rtpdec_xiph.[ch], as a preparation for merging
the Vorbis / theora depacketizers.

Patch by Josh Allmann <joshua DOT allmann AT gmail DOT com>.

Originally committed as revision 22765 to svn://

72415b2a 03/30/2010 11:30 PM Stefano Sabatini

Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://

887af2aa 03/22/2010 04:26 PM Josh Allmann

RTP depacketization of Theora

Patch by Josh Allmann (joshua allmann gmail com)

Originally committed as revision 22636 to svn://

f65919af 02/28/2010 11:03 AM Martin Storsjö

Rename RTP depacketizer files from rtp_* to rtpdec_*

Originally committed as revision 22109 to svn://

fc78b0cb 02/16/2010 11:00 PM Ronald S. Bultje

Remove first_rtcp_ntp_time. This is used to prevent overflow of the timestamp,
but doesn't actually do that. What's worse, it creates timestamp adjustments
that are different per stream within a session, leading to a/v sync issues.

See discussion in thread "[FFmpeg-devel] rtp streaming x264+audio issues (and...

9c8fa20d 02/16/2010 10:50 PM Martin Storsjö

When using RTP-over-UDP, send dummy packets during stream setup, similar to
what e.g. RealPlayer does. This allows proper port forwarding setup in NAT-
based environments.

Patch by Martin Storsjö <$firstname at $firstname dot st>.

Originally committed as revision 21856 to svn://

556aa7a1 02/10/2010 05:20 PM Ronald S. Bultje

RTP/AMR depacketizer, by Martin Storsjö <$firstname at $firstname dot st>.

Originally committed as revision 21740 to svn://

9125806e 02/01/2010 11:10 PM Alexis Ballier

Fix warnings about implicit function declaration when compiling rtpdec.c

Patch by Alexis Ballier, alexis D ballier A gmail

Originally committed as revision 21601 to svn://

45aa9080 01/28/2010 04:08 PM Ronald S. Bultje

Add RTP/H.263 depacketizer by Martin Storsjö <$firstname () $firstname st>.

Originally committed as revision 21512 to svn://

76faff6e 12/23/2009 09:23 PM Luca Abeni

Add support for mp3 over RTP in rtpdec.c

Originally committed as revision 20916 to svn://

e6327fba 04/14/2009 03:01 PM Ronald S. Bultje

Add a Vorbis payload parser. Implemented by Colin McQuillan as a GSoC
qualification task, see "RTP/Vorbis payload implementation (GSoC qual
task)" thread on mailinglist.

Originally committed as revision 18509 to svn://

9106a698 04/13/2009 04:20 PM Stefano Sabatini

Rename bitstream.h to get_bits.h.

Originally committed as revision 18494 to svn://

e9fce261 03/20/2009 01:11 AM Ronald S. Bultje

Assign the x-pf-asf payload string to be decoded by rtp_asf.c, and add a
SDP line handler that parses the streamID in the SDP so that ASF stream
data can be matched to their respective streams in the RTSP demuxer. See
"[PATCH] RTSP-MS 12/15: ASF payload support" thread on mailinglist....

eafb17d1 03/03/2009 01:51 PM Ronald S. Bultje

Don't let finalize_packet() touch pkt->stream_index. Instead, let individual
payload handlers take care of that themselves at their own option. What this
patch really does is "fix" a bug in MS-RTSP protocol where incoming packets
are always coming in over the connection (UDP) or interleave-id (TCP) of...

95f03cf3 03/03/2009 01:42 PM Ronald S. Bultje

Reindent after r17764.

Originally committed as revision 17765 to svn://

f3e71942 03/03/2009 01:41 PM Ronald S. Bultje

In the current implementation of rtp_parse_packet(), finalize_packet() is
called for all packets with an internal handler function but only for
non-first packets from dynamic payload parse_packet() handlers. This patch
fixes that. Bug was noticed by Luca in "[PATCH] rtpdec.c: don't overwrite...

144ae29d 02/26/2009 02:24 PM Ronald S. Bultje

Implement marker bit, which is used for several RTP payloads currently
under review. See "[FFmpeg-devel] RTP mark bit not passed to parse_packet"
thread on mailinglist.

Originally committed as revision 17616 to svn://

302879cb 02/06/2009 10:35 AM Luca Abeni

Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h

Originally committed as revision 17016 to svn://

1a45a9f4 02/06/2009 01:37 AM Ronald S. Bultje

Add "AVFormatContext *ctx" (that being the RTSP demuxer's) as first argument
to the parse_packet() function pointer in RTPDynamicProtocolHandlers. This
allows these functions to peek back and retrieve values from the demuxer's
context (or RTSPState). The ASF/RTP payload parser will use this to be able...

20631a9c 01/27/2009 12:23 PM Luca Abeni

Merge rtp_internal.h in rtp.h, and remove rtp_internal.h

Originally committed as revision 16817 to svn://

406792e7 01/19/2009 03:46 PM Diego Biurrun

cosmetics: Remove pointless period after copyright statement non-sentences.

Originally committed as revision 16684 to svn://

be73a544 12/13/2008 11:25 PM Luca Abeni

Rename rtp_payload_data_t to avoid clashes with the POSIX namespace

Originally committed as revision 16115 to svn://

99a1d191 10/04/2008 04:16 AM Ronald S. Bultje

Remove access into RTPDemuxContext in rtsp.c, which allows making it opaque
(and thus preparing for the introduction of RDTDemuxContext) in a next patch.
See discussion in "RDT/Realmedia patches #2" thread on ML.

Originally committed as revision 15542 to svn://

9b932b8a 10/04/2008 04:15 AM Ronald S. Bultje

Change function prototype of RTPDynamicPayloadHandler.parse_packet() to
not use RTPDemuxContext, but rather take a pointer to the payload context
directly. This allows using payload handlers regardless over the transport
over which they were sent, and prepares for the introduction of a future...

d0feff2a 09/29/2008 06:22 AM Diego Biurrun

Uniformly define _XOPEN_SOURCE to 600.
The feature_tests.h header from Sun systems (Solaris/OpenSolaris) will abort
the build if _XOPEN_SOURCE is defined to 500, and C99 is requested (as well
as POSIX.1-2001), and will only accept it to be defined to 600....

0369d2b0 09/07/2008 01:19 AM Ronald S. Bultje

Give register_dynamic_payload_handler() in rtpdec.c a ff_ prefix and export
it so that I can use it in rdt.c as well. See discussion in "Realmedia patch"
thread on ML.

Originally committed as revision 15233 to svn://

26efefc5 08/22/2008 07:03 PM Luca Abeni

Do not set timestamp information for a non existing AVStream
(fix a bug in the RTP demuxer)

Originally committed as revision 14909 to svn://

7246177d 08/14/2008 10:01 PM Aurelien Jacobs

ensure we get explicit definition of various _XOPEN_SOURCE functions we use

Originally committed as revision 14766 to svn://

e8420626 07/13/2008 07:41 PM Måns Rullgård

RTP: use dprintf(), allow compilation with -DDEBUG

Originally committed as revision 14211 to svn://

fba7815d 07/02/2008 10:26 AM Luca Abeni

Reindent after last commit

Originally committed as revision 14046 to svn://

d6b9e57a 07/02/2008 10:23 AM Luca Abeni

Fix A/V synch for RTP streams that do not contain MPEG1 or 2
(correctly compute the presentation times based on the RTP timestamps
and the RTCP SR packets)

Originally committed as revision 14045 to svn://

245976da 05/09/2008 11:56 AM Diego Biurrun

Use full path for #includes from another directory.

Originally committed as revision 13098 to svn://

bd107136 03/15/2008 04:15 PM Diego Biurrun

typo fixes

Originally committed as revision 12449 to svn://

f841a0fc 01/18/2008 08:48 PM Ronald S. Bultje

Add a flags field to the RTPDynamicPayloadPacketHandlerProc (PKT_FLAG_*).
This can be used later by RDT to get the flags from the RTP packet and
use that for the RealMedia packet (such as whether this RTP packet
represents a keyframe or not). For discussion, see "[PATCH] Realmedia...

f739b36d 01/10/2008 01:54 PM Ronald S. Bultje

Reindent after r11493 (always use parse_packet() vfunc in rtp_parse_packet()),
see "[PATCH] Realmedia / RTSP (RDT)" thread on ML.

Originally committed as revision 11494 to svn://

b4e3330c 01/10/2008 01:52 PM Ronald S. Bultje

Make rtp_parse_packet() always call the vfunc of the dynamic payload handler
if there is one. See "[PATCH] Realmedia / RTSP (RDT)" thread on ML.

Originally committed as revision 11493 to svn://

8eb793c4 01/04/2008 07:33 PM Luca Abeni

Split the RTP demuxing functions out of rtp.c, to simplify the RTP muxer's dependencies

Originally committed as revision 11406 to svn://