Commit Graph

38196 Commits

Author SHA1 Message Date
Martin Storsjö b97b1adb3f rtmpproto: Add a comment explaining the logic in handle_notify
This explains why the cleanup in 5626f994f was wrong and why
ae0f316a was needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-20 10:47:15 +03:00
Luca Barbato e5d45e028c build: Support cparser 2013-09-19 21:53:21 +02:00
Martin Storsjö d8798276b6 r3d: Add more input value validation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:47:26 +03:00
Martin Storsjö 3ca14aa596 rl2: Avoid a division by zero
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:47:00 +03:00
Martin Storsjö 83c285f880 wtv: Add more sanity checks for a length read from the file
Also make sure the existing length check can't overflow.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:46:35 +03:00
Martin Storsjö d8b6866014 yop: Clear all references to the AVBuffer in the local AVPacket
This makes sure that it doesn't try to free an AVBuffer belonging
to an earlier packet when we free the local packet at the end.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:46:21 +03:00
Martin Storsjö 3185a80259 fraps: Make the input buffer size checks more strict
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:45:59 +03:00
Martin Storsjö 82e266c6d3 segafilm: Validate the number of audio channels
This avoids divisions by zero later.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:45:40 +03:00
Martin Storsjö 601c2015bc svq3: Avoid a division by zero
If the height is zero, the decompression will probably end up
failing due to not fitting into the allocated buffer later
anyway, so this doesn't need any more elaborate check.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:45:16 +03:00
Martin Storsjö 7a5a557227 qpeg: Add checks for running out of rows in qpeg_decode_inter
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:44:39 +03:00
Martin Storsjö e9d61de96c mpegaudiodec: Validate that the number of channels fits at the given offset
This is similar to the fix in 35cbc98b.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:44:18 +03:00
Martin Storsjö f50803354c asvdec: Verify the amount of extradata
The init function reads one byte of extradata.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:43:55 +03:00
Martin Storsjö 72fe16a13e movenc: Use null buffers for measuring the amount of data to be written
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:42:40 +03:00
Martin Storsjö 3627ce2f1d aviobuf: Add functions for null buffers
Null buffers are useful for simulating writing to a real buffer
for the sake of measuring how many bytes are written.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:42:37 +03:00
Vladimir Pantelic bb461370e3 asfenc: mux chapters in ASF files using an ASF "marker" section
ASF markers only have a start time, so we lose the chapter end times,
but that is ASF for you

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:51:49 +02:00
Vladimir Pantelic 09f3c937ed asfenc: remember send time and offset of the index entries
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:37:59 +02:00
Vladimir Pantelic 1eb9328030 asfenc: add ASF_Reserved_4 as defined in section 10.10 of the ASF spec
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:37:46 +02:00
Vladimir Pantelic c53b5dda35 asfdec: replace magic constant with DATA_HEADER_SIZE
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:37:37 +02:00
Vladimir Pantelic 5f40833360 asfdec: substract preroll time from marker presentation time
this was forgotten when we changed ASF to not output the preroll time

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:37:28 +02:00
Martin Storsjö fdbd924b84 rv34: Fix a memory leak on errors
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 11:09:18 +03:00
Martin Storsjö bcbe4f3ceb idroqdec: Make sure a video stream has been allocated before returning packets
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 11:09:04 +03:00
Martin Storsjö 5372cda671 rv10: Validate the dimensions set from the container
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 11:08:54 +03:00
Luca Barbato ae0f316a47 rtmp: Unbreak handle_notify
Commit 5626f994f2 broke it.
2013-09-19 09:13:04 +02:00
Alex Converse 1914e6f010 aacdec: Add support for LD (Low Delay) AAC 2013-09-18 12:01:53 -07:00
Alex Converse 5cdefc0207 aacdec: Add support for Error Resilience syntax.
This does not add support for any error resilience tools.
2013-09-18 12:01:49 -07:00
Justin Ruggles c4bfa09807 Add a WebP decoder
Container and lossy decoding by Aneesh Dogra <aneesh@sugarlabs.org>
Lossless decoding by Justin Ruggles <justin.ruggles@gmail.com>
2013-09-18 14:10:05 -04:00
Justin Ruggles 9ae53c5860 lavc: add ff_u8_to_s8() for safe type punning of uint8_t to int8_t 2013-09-18 14:10:05 -04:00
Alexandra Khirnova 5626f994f2 avformat: Use av_reallocp() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-18 18:28:38 +02:00
Martin Storsjö 0f310a6f33 rmdec: Validate the fps value
Abort if it is invalid if strict error checking has been requested.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-18 11:30:06 +03:00
Martin Storsjö e7bf085b78 movenc: Add an option for omitting the tfhd base offset
This makes the output fragments independent of their position in
the output stream, making the output work better when streamed.

QuickTime Player doesn't support fragmented mp4 without the base
data offset, though.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 23:30:31 +03:00
Martin Storsjö a4adabb460 movenc: Write the moof atom in two passes
This is a bit more work, but avoids having to fill in
the data offset field afterwards instead of directly when
the rest of the trun atom is written.

This simplifies future cases where this field needs to be set to
something different.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 23:25:46 +03:00
Martin Storsjö c77d409bf9 twinvqdec: Check the ibps parameter separately
This is required, since invalid parameters actually could
pass the switch check below.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 23:22:46 +03:00
Josh Allmann 8583b14252 rtmp: Support reading interleaved chunks.
A given packet won't always come in contiguously; sometimes
they may be broken up on chunk boundaries by packets of another
channel.

This support primarily involves tracking information about the
data that's been read, so the reader can pick up where it left
off for a given channel.

As a side effect, we no longer over-report the bytes read if
(toread = MIN(size, chunk_size)) == size

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 23:19:11 +03:00
Martin Storsjö d4c2a3740f xmv: Add more sanity checks for parameters read from the bitstream
Since the number of channels is multiplied by 36 and assigned to
to a uint16_t, make sure this calculation didn't overflow. (In
certain cases the calculation could overflow leaving the
truncated block_align at 0, leading to divisions by zero later.)

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 20:09:25 +03:00
Martin Storsjö dc4acc8200 rtmpproto: Extend a comment to explain the prev_pkt arrays roles
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 20:09:25 +03:00
Martin Storsjö 647d655d19 rtmpproto: Consistently use the right prev_pkt array
prev_pkt[0] is used for input packets, while prev_pkt[1] is
used for output.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 20:09:24 +03:00
Martin Storsjö 0d3784396b rtmpproto: Check for the right return code
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 20:09:22 +03:00
John Stebbins 8411baf6f0 dca_parser: Handle changes in DCA frame size
A change in framesize caused a perpetual loss of synchronization.
So read (and use) the frame size from the frame header instead of
setting it only once.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-17 18:16:47 +02:00
Martin Storsjö 18a245a2ae jpeg2000dec: Add more checks when parsing headers
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 15:57:27 +03:00
Luca Barbato c38854c399 doc: Add missing hashes and dates to APIChanges
Also fix the typo in the last entry version.
2013-09-17 13:31:54 +02:00
Martin Storsjö b1db33159f ffv1: Make sure at least one slice context is initialized
This avoids crashes when initializing the range coder for
the first slice context.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:38 +03:00
Martin Storsjö ea78a348d8 eacmv: Make sure a reference frame exists before referencing it
This is similar to an existing check for the second-last frame
from 062421e3.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:38 +03:00
Martin Storsjö c39f7eba01 truemotion2: Use av_freep properly in an error path
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:38 +03:00
Martin Storsjö f875a732e3 mpeg4videodec: Check the width/height in mpeg4_decode_sprite_trajectory
This avoids a potential division by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:38 +03:00
Martin Storsjö a92538b7c0 ivi_common: Make sure color planes have been initialized
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:38 +03:00
Martin Storsjö 7f8d41eb09 mov: Don't use a negative duration for setting other fields
Some files have the duration set to -1 in the mdhd atom, more
or less legitimately. (We produce such files ourselves, for the
initial duration in fragmented mp4 files.)

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:37 +03:00
Martin Storsjö 19b9659f31 oggparseogm: Convert to use bytestream2
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:37 +03:00
Martin Storsjö 711c970168 rv34: Check the return value from ff_rv34_decode_init
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:37 +03:00
Martin Storsjö 569d18aa9d matroskadec: Verify realaudio codec parameters
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:22:30 +03:00
Martin Storsjö e1f3847f86 mace: Make sure that the channel count is set to a valid value
Also return a proper error code.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:21:46 +03:00