Commit Graph

38530 Commits

Author SHA1 Message Date
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
Martin Storsjö 1115689d54 svq3: Check for any negative return value from ff_h264_check_intra_pred_mode
Also pass on any returned 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:16 +03:00
Josh Allmann f8d1bb6723 rtmp: rename main_channel_id to stream_id.
This more closely corresponds to the usage of the field.
Its usage here is unrelated to the channel ID.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:03:36 +03:00
Josh Allmann d4aef99780 rtmp: Follow Flash player numbering for channels.
Channel 4 is typically used by the Flash player to transmit
audio, channel 6 for video, and various stream-specific invokes
get sent over channel 8, which is designated the source channel.

This more closely matches the behavior of the Flash player,
including the transmission of play requests over channel 8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:03:36 +03:00
Josh Allmann 120af23cd5 rtmp: Send video on a separate channel.
Sending non-monotonic packets (e.g. when the audio and video
streams are monotonic within themselves but not muxed
monotonically) will lead to negative values the RTMP timestamp
field (where timestamps are transmitted only as deltas for each
channel), and this delta can end up being incorrectly written as
a large unsigned number.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:03:36 +03:00
Alexandra Khirnova 68b4677420 lavf: Make probe_codec return an error code
This allows handling errors from av_realloc properly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:28:23 +03:00
Martin Storsjö 1daea5232f x86: Add an xmm clobbering wrapper for avcodec_encode_video2
This is required since 187105ff8 when we started trying to
wrap this function as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:22:41 +03:00
Clément Bœsch 7308439158 lavf: Don't explicitly flush after each written packet in muxers
Since 596e5d4783, this is not necessary anymore. It also allows to
actually disable the flushing, improving write performance (but
possibly giving worse latency in real-time streaming).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:17:33 +03:00
Luca Barbato 596e5d4783 lavf: Add a flag to enable/disable per-packet flushing
This is enabled by default and can be disabled with
"-fflags -flush_packets".

Inspired by a patch from Nicolas George <nicolas.george@normalesup.org>.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:11:08 +03:00
Luca Barbato 0a9425d7cf flv: Do not export datastream as metadata
It is used internally.
2013-09-16 19:36:37 +02:00
Luca Barbato 92ed83e393 rtmp: Store all the notify messages
The onTextData is used to implement text data streams in flv.
2013-09-16 19:36:37 +02:00
Luca Barbato fe0337e89b rtmp: Do not send the first field twice within the handshake 2013-09-16 19:36:37 +02:00
Luca Barbato 666ed7eda1 rtmp: Drop an unneeded warning
Apparently a widely used streaming server requires that the second
field always presents a version during C1 phase.
2013-09-16 19:36:37 +02:00
Luca Barbato ffb7669e47 rtmp: Support play method in listen mode 2013-09-16 19:36:37 +02:00
Luca Barbato 97d35fa89f rtmp: Factor out publish specific code
Will be reused for supporting play.
2013-09-16 19:36:37 +02:00
Luca Barbato 3feb3d6ce4 mem: Introduce av_reallocp 2013-09-16 19:36:37 +02:00
Vittorio Giovara 187105ff8a Fix references to deleted avcodec_encode_video() function 2013-09-16 13:59:19 +02:00