ffmpeg.git
4 years agoavformat/adxdec: set avctx->channels in adx_read_header
Andreas Cadhalpun [Thu, 26 Feb 2015 00:06:57 +0000 (01:06 +0100)]
avformat/adxdec: set avctx->channels in adx_read_header

It is used in adx_read_packet, which currently depends on the
decoder/parser setting this value between reading the file header and
demuxing the first packet.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agormenc: limit packet size
Andreas Cadhalpun [Mon, 2 Mar 2015 15:52:26 +0000 (16:52 +0100)]
rmenc: limit packet size

The chunk size is limited to UINT16_MAX (written by avio_wb16), so make
sure that the packet size is not too large.

Such large frames need to be split into slices smaller than 64 kB, but
that is currently supported neither by the rv10/rv20 encoders nor the rm
muxer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agowebp: validate the distance prefix code
Andreas Cadhalpun [Mon, 2 Mar 2015 19:47:57 +0000 (20:47 +0100)]
webp: validate the distance prefix code

According to the WebP Lossless Bitstream Specification the highest
allowed value for a prefix code is 39.

If prefix_code is too large, the calculated extra_bits has an invalid
value and triggers an assertion in get_bits.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agorv10: check size of s->mb_width * s->mb_height
Andreas Cadhalpun [Tue, 3 Mar 2015 20:31:15 +0000 (21:31 +0100)]
rv10: check size of s->mb_width * s->mb_height

If it doesn't fit into 12 bits it triggers an assertion.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agortpdec: experimental VP9 depacketizer (draft 0)
Thomas Volkert [Tue, 3 Mar 2015 23:33:31 +0000 (00:33 +0100)]
rtpdec: experimental VP9 depacketizer (draft 0)

The code was tested with live555 server.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agopcxenc: Return more meaningful error codes
Himangi Saraogi [Wed, 4 Mar 2015 15:44:04 +0000 (21:14 +0530)]
pcxenc: Return more meaningful error codes

Signed-off-by: Diego Biurrun <diego@biurrun.de>
4 years agordt: Use a separate variable to clarify the different value namespaces
Martin Storsjö [Wed, 4 Mar 2015 08:00:08 +0000 (10:00 +0200)]
rdt: Use a separate variable to clarify the different value namespaces

The original flags variable contains rtpdec flags, while the
rmflags variable contains RM flag bits which have a completely
different definition.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec_qt: Use a local variable instead of RTP_FLAG_KEY
Martin Storsjö [Wed, 4 Mar 2015 07:57:02 +0000 (09:57 +0200)]
rtpdec_qt: Use a local variable instead of RTP_FLAG_KEY

The only case where RTP_FLAG_KEY actually is needed is
in RDT, where such a flag needs to be passed via the
rtpdec parse function's flags parameter.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec_asf: Don't set RTP_FLAG_KEY
Martin Storsjö [Wed, 4 Mar 2015 07:52:33 +0000 (09:52 +0200)]
rtpdec_asf: Don't set RTP_FLAG_KEY

Nothing in the framework nor in the rest of the depacketizer actually
uses this flag - the chained demuxer sets the keyframe flag properly on
demuxed packets already.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoflv: Validate and reject unsupported codecs
Luca Barbato [Tue, 3 Mar 2015 13:39:26 +0000 (14:39 +0100)]
flv: Validate and reject unsupported codecs

And provide a more informative message in case of failure.

CC: libav-stable@libav.org
4 years agoaac: Relax reserved_bit validation
Vittorio Giovara [Tue, 3 Mar 2015 19:38:32 +0000 (19:38 +0000)]
aac: Relax reserved_bit validation

Although the specification mandates this bit to zero, it may happen
that software tools incorrectly flip it to one, invalidating a possibly
valid stream.

Relax this restriction, by failing only when AV_EF_BITSTREAM is set.
This behaviour is similar to aac decoders in Firefox and Quicktime.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agodca: Move syncword definitions to a separate header
Diego Biurrun [Wed, 25 Feb 2015 12:50:15 +0000 (13:50 +0100)]
dca: Move syncword definitions to a separate header

4 years agortpdec_asf: Don't free the payload context in the .close function
Martin Storsjö [Wed, 4 Mar 2015 07:50:44 +0000 (09:50 +0200)]
rtpdec_asf: Don't free the payload context in the .close function

This was missed in bb4a310bb. This fixes a double free on close.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agofate: Specify the idct to use for the aic-oddsize test
Martin Storsjö [Wed, 4 Mar 2015 07:31:16 +0000 (09:31 +0200)]
fate: Specify the idct to use for the aic-oddsize test

This fixes fate on all architectures that have an optimized
but not bitexact idct available.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec_mpa_robust: Fix incrementing split_pos
Martin Storsjö [Mon, 2 Mar 2015 12:46:30 +0000 (14:46 +0200)]
rtpdec_mpa_robust: Fix incrementing split_pos

This fixes an oversight in 96084251, in a refactoring done on top
of Gilles' original patch.

Pointed out by Gilles Chanteperdrix.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agowma.h: #include "avcodec.h"
Anton Khirnov [Mon, 2 Mar 2015 20:51:02 +0000 (21:51 +0100)]
wma.h: #include "avcodec.h"

It's required for at least AVCodecContext.

Fixes make checkheaders.

4 years agoasf: do not export XMP metadata by default
Vittorio Giovara [Mon, 2 Mar 2015 18:04:03 +0000 (18:04 +0000)]
asf: do not export XMP metadata by default

Similarly to what has been done for MOV, display XMP metadata only when
users explicitly require it.

The Extensible Metadata Platform tag can contain various kind of data
which are not strictly related to the video file, such as history of
edits and saves from the project file.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agofate: Add AIC test with odd sizes
Vittorio Giovara [Mon, 2 Mar 2015 13:03:39 +0000 (13:03 +0000)]
fate: Add AIC test with odd sizes

4 years agoaic: Fix decoding files with odd dimensions
Vittorio Giovara [Fri, 27 Feb 2015 19:00:25 +0000 (19:00 +0000)]
aic: Fix decoding files with odd dimensions

Normally the aic decoder finds the proper slice combination (multiple of
some number less than 32) but in case of odd width, it resorts to the
default values, which were actually swapped.
The number of slices is modified to account for such odd width cases.

CC: libav-stable@libav.org
4 years agodashenc: Simplify code by using a local variable
Martin Storsjö [Mon, 2 Mar 2015 12:10:22 +0000 (14:10 +0200)]
dashenc: Simplify code by using a local variable

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoRevert "mov: Change DTS-based seek into CTS-based seek."
Martin Storsjö [Sat, 28 Feb 2015 21:51:16 +0000 (23:51 +0200)]
Revert "mov: Change DTS-based seek into CTS-based seek."

This reverts commit 4abfa387b8234736f6e0e541951e3d5eb60eb843.

This commit broke playback of fragmented mp4 files with b-frames.
While investigating this, it turned out that the general framework
isn't ready for a PTS-based index yet. Revert this change until
a better thought out solution is in place.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agov4l2: Add support for h264
Luca Barbato [Fri, 27 Feb 2015 00:34:52 +0000 (01:34 +0100)]
v4l2: Add support for h264

4 years agov4l2: Use the codec descriptor facility
Luca Barbato [Fri, 27 Feb 2015 01:12:33 +0000 (02:12 +0100)]
v4l2: Use the codec descriptor facility

The encoder or decoder might be disabled but the format would be
supported for at least remuxing.

4 years agoprores: Extend the padding check to 16bit
Luca Barbato [Wed, 25 Feb 2015 14:29:15 +0000 (15:29 +0100)]
prores: Extend the padding check to 16bit

Some files produced by the official encoder have up to 16bit of
padding instead of the expected padding to the byte.

Use a self-explanatory macro instead of a simple number.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agortpenc: Don't set max_frames_per_packet based on the packet frame size or frame rate
Martin Storsjö [Wed, 25 Feb 2015 22:00:39 +0000 (00:00 +0200)]
rtpenc: Don't set max_frames_per_packet based on the packet frame size or frame rate

Instead check the timestamps while muxing, to avoid buffering a
too long timestamp range into one single packet.

This makes the AMR and AAC packetization slightly less efficient,
since we set a possibly unnecessarily high max_frames_per_packet.
(These packetizers end up doing a memmove of the TOC bytes if
sending a packet before max_frames_per_packet is achieved, and
we end up setting max_frames_per_packet to a value that should
be high enough for most uses.)

All packetizers that use max_frames_per_packet now set it either
to a default value, or to a value calculated based on other
parameters, so none of them rely on the previous default setting.

For iLBC, copy one frame at a time, to allow checking the timestamp
range for each of them - basically doing potentially multiple
loops to simplify the code instead of trying to calculate the
number of frames to buffer while honoring s1->max_delay.

This is in preparation for reducing the coupling between libavformat
and libavcodec, by not having the muxers use the encoder field
frame_size (which may not be available during e.g. stream copy).

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc: Restructure if statements in packetizers to simplify adding more conditions
Martin Storsjö [Fri, 27 Feb 2015 10:32:42 +0000 (12:32 +0200)]
rtpenc: Restructure if statements in packetizers to simplify adding more conditions

Factorize out the s->num_frames check at the start of the if statements,
simplifying adding more alternative causes for sending the buffered
frames.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc: Skip redundant initialization
Martin Storsjö [Thu, 26 Feb 2015 11:37:56 +0000 (13:37 +0200)]
rtpenc: Skip redundant initialization

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc: Always do the default initialization regardless of codecs
Martin Storsjö [Thu, 26 Feb 2015 11:33:59 +0000 (13:33 +0200)]
rtpenc: Always do the default initialization regardless of codecs

This avoids having to jump to the defaultcase in the switch. Manually
override the stream time base back to 90 kHz for the few audio codecs
that don't use the sample rate as time base (mp2, mp3).

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc_xiph: Don't exclude headers from max_payload_size
Martin Storsjö [Thu, 26 Feb 2015 11:39:17 +0000 (13:39 +0200)]
rtpenc_xiph: Don't exclude headers from max_payload_size

This makes things more consistent by using the variable in the same
way as in all other packetizers.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc_xiph: Use AV_WB16 instead of manual bitshifts
Martin Storsjö [Thu, 26 Feb 2015 11:42:43 +0000 (13:42 +0200)]
rtpenc_xiph: Use AV_WB16 instead of manual bitshifts

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc_aac: Use AV_WB16 instead of manual bitshifts
Martin Storsjö [Wed, 25 Feb 2015 22:25:11 +0000 (00:25 +0200)]
rtpenc_aac: Use AV_WB16 instead of manual bitshifts

This makes the code slightly more readable and understandable.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc_aac: Merge a definition with a declaration
Martin Storsjö [Wed, 25 Feb 2015 22:21:03 +0000 (00:21 +0200)]
rtpenc_aac: Merge a definition with a declaration

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc: Write conditional statements on separate lines
Martin Storsjö [Wed, 25 Feb 2015 21:33:24 +0000 (23:33 +0200)]
rtpenc: Write conditional statements on separate lines

Intentionally keeping some conditional statements on single lines
in rtpenc_h263.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc_aac: Set a default value for max_frames_per_packet at init
Martin Storsjö [Wed, 25 Feb 2015 21:34:36 +0000 (23:34 +0200)]
rtpenc_aac: Set a default value for max_frames_per_packet at init

This avoids having to conditionally set the default within the
packetizer function.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc_amr: Use s->num_frames instead of s->buf_ptr - s->buf
Martin Storsjö [Fri, 27 Feb 2015 10:30:54 +0000 (12:30 +0200)]
rtpenc_amr: Use s->num_frames instead of s->buf_ptr - s->buf

This doesn't fix any bug, but makes the code simpler for later
patches, and more straightforward to read as is.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc_aac: Fix sending fragmented frames
Martin Storsjö [Wed, 25 Feb 2015 21:55:58 +0000 (23:55 +0200)]
rtpenc_aac: Fix sending fragmented frames

After sending a fragmented frame, len (s->buf_ptr - s->buf) isn't
zero, while s->num_frames is zero as intended. Using s->num_frames
makes it work as intended, and is less convoluted than keeping track
of (resetting) s->buf_ptr.

This avoids sending stray data after sending a fragmented aac packet.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoAdd a QSV decoding example.
Anton Khirnov [Wed, 11 Feb 2015 23:07:29 +0000 (00:07 +0100)]
Add a QSV decoding example.

4 years agoavcodec/utils: use correct printf specifier in ff_set_sar
Andreas Cadhalpun [Sat, 28 Feb 2015 19:11:36 +0000 (20:11 +0100)]
avcodec/utils: use correct printf specifier in ff_set_sar

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agox11grab: Unbreak building
Christian Hujer [Fri, 27 Feb 2015 09:22:08 +0000 (10:22 +0100)]
x11grab: Unbreak building

The correct macro is DEC not D. Broken in
b31328d008985f87f0a7c83c700847cef1a4f08c

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agolavc: do not compile fmtconvert unconditionally
Anton Khirnov [Sat, 21 Feb 2015 10:24:44 +0000 (11:24 +0100)]
lavc: do not compile fmtconvert unconditionally

Only ac3dec and dcadec use it.

4 years agofmtconvert: drop unused functions
Anton Khirnov [Sat, 21 Feb 2015 10:37:52 +0000 (11:37 +0100)]
fmtconvert: drop unused functions

4 years agolavc: remove unused traces of fmtconvert usage
Anton Khirnov [Sat, 21 Feb 2015 10:00:59 +0000 (11:00 +0100)]
lavc: remove unused traces of fmtconvert usage

Those decoders have been switched to float output and so do not use
fmtconvert anymore.

4 years agotls: Pass AVOptions dictionaries through to the chained protocol
Martin Storsjö [Sat, 28 Feb 2015 00:15:55 +0000 (02:15 +0200)]
tls: Pass AVOptions dictionaries through to the chained protocol

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agotcp: Clarify the units for the timeout avoptions
Martin Storsjö [Fri, 27 Feb 2015 23:37:18 +0000 (01:37 +0200)]
tcp: Clarify the units for the timeout avoptions

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoavio: Rename avclass symbols relating to avio
Martin Storsjö [Fri, 27 Feb 2015 23:06:28 +0000 (01:06 +0200)]
avio: Rename avclass symbols relating to avio

Don't prefix them ffio_url, which is misleading, sounding too
much like the urlprotocol layer (like ffurl_*).

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoconfigure: Move the cross_prefix setting after the toolchain one
Luca Barbato [Sun, 6 Apr 2014 22:47:42 +0000 (00:47 +0200)]
configure: Move the cross_prefix setting after the toolchain one

Makes passing to configure
--toolchain=gcc-asan --cross-prefix=armv7a-hardfloat-linux-gnueabi-
work as intended.

4 years agoxcbgrab: Unbreak parsing filename options
Luca Barbato [Sun, 22 Feb 2015 19:36:09 +0000 (20:36 +0100)]
xcbgrab: Unbreak parsing filename options

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoxcbgrab: Provide better names for the y and x option
Luca Barbato [Sun, 22 Feb 2015 19:36:08 +0000 (20:36 +0100)]
xcbgrab: Provide better names for the y and x option

Incidentally `-y` also collides with avconv global options.

Update x11grab to match and document the option.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agomatroskaenc: Allow writing track "forced" flag
John Stebbins [Tue, 24 Feb 2015 20:44:48 +0000 (12:44 -0800)]
matroskaenc: Allow writing track "forced" flag

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agortpdec: Rename the free method to close
Martin Storsjö [Tue, 24 Feb 2015 15:01:48 +0000 (17:01 +0200)]
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>
4 years agolibavformat: Use ffio_free_dyn_buf where applicable
Martin Storsjö [Tue, 24 Feb 2015 12:07:54 +0000 (14:07 +0200)]
libavformat: Use ffio_free_dyn_buf where applicable

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec: Use ffio_free_dyn_buf
Martin Storsjö [Tue, 24 Feb 2015 11:37:03 +0000 (13:37 +0200)]
rtpdec: Use ffio_free_dyn_buf

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoavio: Add an internal utility function for freeing dynamic buffers
Martin Storsjö [Tue, 24 Feb 2015 11:23:30 +0000 (13:23 +0200)]
avio: Add an internal utility function for freeing dynamic buffers

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec: Free depacketizers if the init function failed
Martin Storsjö [Tue, 24 Feb 2015 11:18:10 +0000 (13:18 +0200)]
rtpdec: Free depacketizers if the init function failed

This is different from how it is handled in codecs/demuxers/muxers
though (where the close function isn't called if the open function
failed), but since the number of depacketizers that have an .init
function is quite limited, this is easy to change.

The main point is that if the init function failed, we shouldn't
try to use that depacketizer at all - this makes sure that the
parse function doesn't need to check for the things that were
initialized in the init function.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec: Don't free the payload context in the .free function
Martin Storsjö [Tue, 24 Feb 2015 11:07:57 +0000 (13:07 +0200)]
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>
4 years agortpdec: Remove the now unused .alloc field
Martin Storsjö [Tue, 24 Feb 2015 10:45:15 +0000 (12:45 +0200)]
rtpdec: Remove the now unused .alloc field

Always use the .priv_data_size field instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec: Use .init instead of .alloc to set default values
Martin Storsjö [Tue, 24 Feb 2015 10:43:07 +0000 (12:43 +0200)]
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>
4 years agortpdec: Remove unnecessary inline attributes
Martin Storsjö [Tue, 24 Feb 2015 10:56:51 +0000 (12:56 +0200)]
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>
4 years agortpdec: Don't pass non-const pointers to fmtp attribute parsing functions
Martin Storsjö [Tue, 24 Feb 2015 10:32:17 +0000 (12:32 +0200)]
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>
4 years agortpdec: Add const to string parameters in internal fmtp parsing functions
Martin Storsjö [Tue, 24 Feb 2015 10:31:23 +0000 (12:31 +0200)]
rtpdec: Add const to string parameters in internal fmtp parsing functions

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec: Remove unnecessary checks
Martin Storsjö [Tue, 24 Feb 2015 11:30:12 +0000 (13:30 +0200)]
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>
4 years agortpenc: Merge the h264 and hevc packetizers
Martin Storsjö [Mon, 23 Feb 2015 21:06:01 +0000 (23:06 +0200)]
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>
4 years agortpdec_hevc: Share the implementation of fragmented packets with h264
Martin Storsjö [Mon, 23 Feb 2015 21:28:34 +0000 (23:28 +0200)]
rtpdec_hevc: Share the implementation of fragmented packets with h264

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec_hevc: Reduce indentation level by returning early on errors
Martin Storsjö [Mon, 23 Feb 2015 21:17:54 +0000 (23:17 +0200)]
rtpdec_hevc: Reduce indentation level by returning early on errors

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec_hevc: Share the implementation of parsing a=framesize with h264
Martin Storsjö [Mon, 23 Feb 2015 18:59:41 +0000 (20:59 +0200)]
rtpdec_hevc: Share the implementation of parsing a=framesize with h264

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec_hevc: Add asterisks at the start of each long comment line
Martin Storsjö [Mon, 23 Feb 2015 21:13:55 +0000 (23:13 +0200)]
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>
4 years agortpdec: Get rid of all trivial .alloc/.free functions
Martin Storsjö [Mon, 23 Feb 2015 20:18:32 +0000 (22:18 +0200)]
rtpdec: Get rid of all trivial .alloc/.free functions

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec: Allow allocating and freeing the private data without explicit functions
Martin Storsjö [Mon, 23 Feb 2015 19:57:33 +0000 (21:57 +0200)]
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>
4 years agortpdec: Set need_parsing via a handler field
Martin Storsjö [Mon, 23 Feb 2015 19:51:05 +0000 (21:51 +0200)]
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>
4 years agortpdec: Allow setting the need_parsing field in RTPDynamicProtocolHandler
Martin Storsjö [Mon, 23 Feb 2015 19:35:48 +0000 (21:35 +0200)]
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>
4 years agortpdec_mpa_robust: Move .enc_name to the start of the struct
Martin Storsjö [Mon, 23 Feb 2015 19:51:59 +0000 (21:51 +0200)]
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>
4 years agortpdec: Remove unnecessary _if_needed suffixes on functions
Martin Storsjö [Mon, 23 Feb 2015 20:25:55 +0000 (22:25 +0200)]
rtpdec: Remove unnecessary _if_needed suffixes on functions

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec: Change enc_name to a pointer instead of a fixed-size buffer
Martin Storsjö [Mon, 23 Feb 2015 19:53:19 +0000 (21:53 +0200)]
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>
4 years agortpdec_h264: Remove an unnecessary include
Martin Storsjö [Mon, 23 Feb 2015 20:22:28 +0000 (22:22 +0200)]
rtpdec_h264: Remove an unnecessary include

Nothing in this file use any network functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec_h264: Remove unnecessary struct padding
Martin Storsjö [Mon, 23 Feb 2015 20:03:44 +0000 (22:03 +0200)]
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>
4 years agortpdec_amr: Use the common indentation style
Martin Storsjö [Mon, 23 Feb 2015 20:31:29 +0000 (22:31 +0200)]
rtpdec_amr: Use the common indentation style

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortsp: Fix the indentation of a linewrapped statement
Martin Storsjö [Mon, 23 Feb 2015 19:56:28 +0000 (21:56 +0200)]
rtsp: Fix the indentation of a linewrapped statement

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec: Add missing trailing commas
Martin Storsjö [Mon, 23 Feb 2015 20:06:41 +0000 (22:06 +0200)]
rtpdec: Add missing trailing commas

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agolibavformat: add T.140 RTP depacketization (RFC 4103)
Gilles Chanteperdrix [Sun, 8 Feb 2015 21:22:41 +0000 (22:22 +0100)]
libavformat: add T.140 RTP depacketization (RFC 4103)

Map this to AV_CODEC_ID_TEXT.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortsp: Interpret the text media type as AVMEDIA_TYPE_DATA
Martin Storsjö [Mon, 23 Feb 2015 15:16:32 +0000 (17:16 +0200)]
rtsp: Interpret the text media type as AVMEDIA_TYPE_DATA

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agofate: Rename fate-dts test to fate-dca-core
Diego Biurrun [Wed, 18 Feb 2015 23:04:33 +0000 (00:04 +0100)]
fate: Rename fate-dts test to fate-dca-core

The codec is referred to as DCA in other parts of libav.

4 years agoqsv: Skip qsv.h compilation if qsv is not enabled
Diego Biurrun [Mon, 23 Feb 2015 12:43:53 +0000 (13:43 +0100)]
qsv: Skip qsv.h compilation if qsv is not enabled

4 years agortsp: punch holes again after pause
Gilles Chanteperdrix [Sun, 22 Feb 2015 06:59:55 +0000 (07:59 +0100)]
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>
4 years agoeamad: check for out of bounds read
Federico Tomassetti [Wed, 18 Feb 2015 12:11:44 +0000 (12:11 +0000)]
eamad: check for out of bounds read

Bug-Id: CID 1257500
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agomdec: check for out of bounds read
Federico Tomassetti [Wed, 18 Feb 2015 12:11:43 +0000 (12:11 +0000)]
mdec: check for out of bounds read

Bug-Id: CID 1257501
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agortpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation units
Martin Storsjö [Sun, 22 Feb 2015 21:25:28 +0000 (23:25 +0200)]
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>
4 years agoCanopus HQX decoder
Vittorio Giovara [Sun, 22 Feb 2015 18:38:31 +0000 (18:38 +0000)]
Canopus HQX decoder

Based on work by Kostya Shishkov <kostya.shishkov@gmail.com>.

4 years agohevc_deblock: Fix compilation with nasm
Carl Eugen Hoyos [Sun, 22 Feb 2015 17:46:49 +0000 (17:46 +0000)]
hevc_deblock: Fix compilation with nasm

CC: libav-stable@libav.org
Bug-Id: 795
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agolibschroedinger: Check memory allocations
Vittorio Giovara [Sun, 22 Feb 2015 19:49:06 +0000 (19:49 +0000)]
libschroedinger: Check memory allocations

4 years agoconfigure: Properly fail when libcdio/cdparanoia is not found
Vittorio Giovara [Sun, 22 Feb 2015 19:49:52 +0000 (19:49 +0000)]
configure: Properly fail when libcdio/cdparanoia is not found

4 years agoconfigure: Use pkg-config for libdc1394 discovery
Vittorio Giovara [Sun, 22 Feb 2015 20:33:24 +0000 (20:33 +0000)]
configure: Use pkg-config for libdc1394 discovery

Since not all systems need the libraw1394 dependency, let pkg-config
provide the list of libraries actually needed.

The libdc1394-2.pc file has been included since version 2 (2008-01-05),
so it should be safe to use.

4 years agortpenc_hevc: Aggregate multiple NAL units into one RTP packet, if possible
Martin Storsjö [Fri, 20 Feb 2015 19:37:50 +0000 (21:37 +0200)]
rtpenc_hevc: Aggregate multiple NAL units into one RTP packet, if possible

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpenc_h264: Aggregate multiple NAL units into one RTP packet, if possible
Martin Storsjö [Fri, 20 Feb 2015 19:21:27 +0000 (21:21 +0200)]
rtpenc_h264: Aggregate multiple NAL units into one RTP packet, if possible

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec: DV depacketizer (RFC 6469)
Thomas Volkert [Sat, 21 Feb 2015 17:35:50 +0000 (18:35 +0100)]
rtpdec: DV depacketizer (RFC 6469)

(tested with live555 RTSP server)

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec_mpeg4: reassemble fragmented AAC frames
Gilles Chanteperdrix [Fri, 13 Feb 2015 21:51:32 +0000 (22:51 +0100)]
rtpdec_mpeg4: reassemble fragmented AAC frames

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortpdec_mpeg4: add more verbose error logging
Gilles Chanteperdrix [Fri, 20 Feb 2015 21:41:58 +0000 (23:41 +0200)]
rtpdec_mpeg4: add more verbose error logging

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agolibavformat: add robust MPEG audio depacketization (RFC 5219)
Gilles Chanteperdrix [Fri, 13 Feb 2015 21:51:33 +0000 (22:51 +0100)]
libavformat: add robust MPEG audio depacketization (RFC 5219)

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agompegaudio_parser: add MP3 ADU headers parser
Gilles Chanteperdrix [Fri, 13 Feb 2015 21:51:33 +0000 (22:51 +0100)]
mpegaudio_parser: add MP3 ADU headers parser

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agolibavformat: add AC3 RTP depacketization (RFC 4184)
Gilles Chanteperdrix [Fri, 13 Feb 2015 21:51:34 +0000 (22:51 +0100)]
libavformat: add AC3 RTP depacketization (RFC 4184)

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agortsp: parse lang attribute in SDP
Gilles Chanteperdrix [Sun, 8 Feb 2015 21:22:45 +0000 (22:22 +0100)]
rtsp: parse lang attribute in SDP

Signed-off-by: Martin Storsjö <martin@martin.st>