Martin Storsjö
f4b59334bd
rtpdec: Remove the now unused .alloc field
...
Always use the .priv_data_size field instead.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
78791c086b
rtpdec: Use .init instead of .alloc to set default values
...
The ugly error handling in rdt gets improved in a later commit.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
88434f9725
rtpdec: Remove unnecessary inline attributes
...
These functions are far from performance critical, so there's no
point in marking them as inline.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
ec96a89c3e
rtpdec: Don't pass non-const pointers to fmtp attribute parsing functions
...
This makes it clear that the individual parsing functions can't
touch the parsed out value.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
ac0e54fda9
rtpdec: Add const to string parameters in internal fmtp parsing functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
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>
10 years ago
Kevin Wheatley
3664703780
avformat/movenc: Fix writing ACLR atoms for DNxHD
...
Using the copy codec ACLR atoms where incorrectly written
During the creation of the ACLR atom we are assuming the vos_data
contains the DNxHD header. This change makes this explicit and
ensures we don't over write the stream with the extra_data.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
847daac5c0
avformat/dss: Set packet position correctly
...
pos previously was set but then overwritten
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
c82bf15dca
rtpenc: Merge the h264 and hevc packetizers
...
They share a great deal of common structure; only a few minor
bits in the headers differ.
This also fixes an off-by-one in sending of the last fragment
of large HEVC nals (where it previously sent len+2 bytes, even
if it should have been len+RTP_HEVC_HEADERS_SIZE aka len+3).
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
3567b91e49
rtpdec_hevc: Share the implementation of fragmented packets with h264
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
f3449062a8
rtpdec_hevc: Reduce indentation level by returning early on errors
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
8633fb47db
rtpdec_hevc: Share the implementation of parsing a=framesize with h264
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
5956f489d0
rtpdec_hevc: Add asterisks at the start of each long comment line
...
This is the common style for such comments.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
5d8cae4573
rtpdec: Get rid of all trivial .alloc/.free functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
e72605f80b
rtpdec: Allow allocating and freeing the private data without explicit functions
...
This can reduce the amount of boilerplate in simple depacketizers.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
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>
10 years ago
Martin Storsjö
b7a4c319fd
rtpdec: Allow setting the need_parsing field in RTPDynamicProtocolHandler
...
This allows getting rid of quite a bit of boilerplate in depacketizers.
The default value (initializing need_parsing to 0, aka
AVSTREAM_PARSE_NONE) is the same as it is initialized to by default
in AVStream.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
b651c9139e
rtpdec_mpa_robust: Move .enc_name to the start of the struct
...
This makes it match the other depacketizers.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
db158f0dd2
rtpdec: Remove unnecessary _if_needed suffixes on functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
353b492d0f
rtpdec: Change enc_name to a pointer instead of a fixed-size buffer
...
This avoids allocating space for a too large buffer for all the
name strings.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
0752f700d6
rtpdec_h264: Remove an unnecessary include
...
Nothing in this file use any network functions.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
247764a592
rtpdec_h264: Remove unnecessary struct padding
...
There's no point in adding padding in the allocation of a depacketizer
specific context struct.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
fe414059ec
rtpdec_amr: Use the common indentation style
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
74d318f138
rtsp: Fix the indentation of a linewrapped statement
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
3cd5828fc0
rtpdec: Add missing trailing commas
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Gilles Chanteperdrix
04a1be8e28
libavformat: add T.140 RTP depacketization (RFC 4103)
...
Map this to AV_CODEC_ID_TEXT.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
26524e3581
rtsp: Interpret the text media type as AVMEDIA_TYPE_DATA
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Clément Bœsch
cc69ccb6d4
avformat/nutdec: fix isom and mpa build deps
...
Fixes the following link error:
nutdec.c:(.text+0x2d47): undefined reference to `ff_codec_movvideo_tags'
isom.c:(.text+0x332): undefined reference to `avpriv_mpeg4audio_get_config'
isom.c:(.text+0x39e): undefined reference to `avpriv_mpa_freq_tab'
10 years ago
Michael Niedermayer
4d1b017c38
avformat/mov: Check av_add_index_entry() return value
...
Fixes NULL pointer dereference
Fixes: signal_sigsegv_b060e0_3794_cov_1293954059_vc1-wmapro.ism
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6c9537b807
avformat/hlsenc: Warn if a non file protocol is used
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gilles Chanteperdrix
cdcc370293
rtsp: punch holes again after pause
...
When a client behind a NAT issues a pause command, and stay paused for a
long time, the router may stop the RTP/RTCP port redirection. Resend the
hole punching packets before each PLAY command to cause the router to
restart the port redirection in that case.
Move the existing code for sending the packets from the SETUP phase
to the PLAY phase.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
fe208ca54b
rtpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation units
...
Only the first aggregation unit has 2 bytes (DONL) prepended, if
such a field is in use.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Vittorio Giovara
35c6ce76b1
Canopus HQX decoder
...
Based on work by Kostya Shishkov <kostya.shishkov@gmail.com>.
10 years ago
Martin Storsjö
a388e72d1a
rtpenc_hevc: Aggregate multiple NAL units into one RTP packet, if possible
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
e2220e734f
rtpenc_h264: Aggregate multiple NAL units into one RTP packet, if possible
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Thomas Volkert
c99915f7c7
rtpdec: DV depacketizer (RFC 6469)
...
(tested with live555 RTSP server)
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Michael Niedermayer
3518925a91
avformat/movenc: Check for memory allocation failures
...
Fixes CID1271049
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
40adcf576f
avformat/oggdec: Check for ost allocation failure
...
Fixes CID1257798
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9b8152bf04
avformat/oggdec: Check for av_malloc() failure and forward the error code
...
Fixes CID1257805
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
5683810302
avformat/rmenc: Check for av_malloc() failure
...
Fixes CID1257832
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gilles Chanteperdrix
22bb5bd7a3
avformat/rtsp: punch holes again after pause
...
When a client behind a NAT issues a pause command, and stay paused for a
long time, the router may stop the RTP/RTCP port redirection. Resend the
hole punching packets after each PLAY command to cause the router to
restart the port redirection in that case.
Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gilles Chanteperdrix
fee2cc39be
avformat/rtpdec_mpeg4: reassemble fragmented AAC frames
...
Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Reviewed-by: Thomas Volkert <silvo@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gilles Chanteperdrix
44dc138ed2
rtpdec_mpeg4: reassemble fragmented AAC frames
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Gilles Chanteperdrix
dcf969e98d
rtpdec_mpeg4: add more verbose error logging
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Gilles Chanteperdrix
96084251e5
libavformat: add robust MPEG audio depacketization (RFC 5219)
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Gilles Chanteperdrix
5e5583efe4
libavformat: add AC3 RTP depacketization (RFC 4184)
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Gilles Chanteperdrix
4438d1c6ed
rtsp: parse lang attribute in SDP
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Gilles Chanteperdrix
1ec28a66f2
rtpdec: fix issue with conversion from unsigned to signed
...
When receiving an RTCP packet, the difference between the last RTCP
timestamp and the base timestamp may be negative. As these timestamps
are of the uint32_t type, the result becomes a large integer. Cast
the difference to int32_t to avoid this issue.
The result of this issue is very large start times for RTSP
streams, and difficulty to restart correctly after a pause.
Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
ff394ca087
rtpdec_h264: Add a missing closing paren in a log message
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Thomas Volkert
7a459be8e7
avformat/rtpdec_dv: fix bundled audio typo
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago