Commit Graph

17 Commits

Author SHA1 Message Date
Alexandra Hájková b1e7394ea0 rtp: Convert to the new bitstream reader 2017-01-13 10:27:03 +01:00
Vittorio Giovara 41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Martin Storsjö d594dbecce rtpdec: Rename the free method to close
Many of these functions were named foo_free_context, and since
the functions no longer should free the context itself, only
allocated elements within it, the previous naming was slightly
misleading.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:50 +02:00
Martin Storsjö 199fb40278 rtpdec: Use ffio_free_dyn_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:44 +02:00
Martin Storsjö bb4a310bb8 rtpdec: Don't free the payload context in the .free function
This makes it more consistent with depacketizers that don't have any
.free function at all, where the payload context is freed by the
surrounding framework. Always free the context in the surrounding
framework, having the individual depacketizers only free any data
they've specifically allocated themselves.

This is similar to how this works for demuxer/muxers/codecs - a
component shouldn't free the priv_data that the framework has
allocated for it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:35 +02:00
Martin Storsjö 12251f997b rtpdec: Remove unnecessary checks
The free function of a depacketizer won't be called if data is NULL.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:14 +02:00
Martin Storsjö 5d8cae4573 rtpdec: Get rid of all trivial .alloc/.free functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:24:19 +02:00
Martin Storsjö 2b982e92f4 rtpdec: Set need_parsing via a handler field
This avoids implementing a full function just to set this one
field.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:22:41 +02:00
Martin Storsjö df07c07b3d rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data
If we throw away the buffered incomplete frame, make sure to also
throw away the buffered bits of an incomplete byte at the same
time.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-18 11:59:54 +02:00
Diego Biurrun 7abd35a1ff avformat: Add av_cold attributes to init functions missing them 2013-05-05 18:33:04 +02:00
Martin Storsjö c6f1dc8e4c rtpdec: Move setting the parsing flags to the actual depacketizers
This gets rid of almost all the codec specific details from the
generic rtpdec code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:20:42 +02:00
Martin Storsjö 90c784cc13 rtpdec: Pass the sequence number to depacketizers
This allows depacketizers to figure out if packets have been lost.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-21 14:14:40 +02:00
Anton Khirnov 179a5c37e0 rtpdec: factorize identical code used in several handlers 2012-11-02 07:58:37 +01:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Martin Storsjö d1beee0701 rtpdec: Don't require frames to start with a Mode A packet
While there is no reason for starting a frame with anything else
than a Mode A packet, some senders seem to consistently use Mode B
packets for everything. This fixes depacketization of such streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-14 22:11:43 +03:00
Martin Storsjö c7e8639c70 rtpdec: Identify incorrectly signalled H263
H263 in RTP can be packetized in two formats (RFC 2190, RFC
2429/4629). The former normally uses the static payload type 34,
while the latter normally uses dynamic payload types with the
SDP format names H263-1998 or H263-2000.

Look for packets that don't look like proper RFC 2190 packets and
switch to depacketizing them according to the new format if they
match some heuristic criteria.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 17:31:55 +02:00
Martin Storsjö 08bddfcde5 rtpdec: Support H263 in RFC 2190 format
This is different from the "modern" RTP payload formats for H263
as defined by RFC 4629, 2429 and 3555. According to the newer RFCs,
this old one is to be considered deprecated and only be used for
interoperating with legacy systems.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:31 +02:00