Commit Graph

9362 Commits

Author SHA1 Message Date
Rafaël Carré c3e58f8fb7 matroskaenc: restore compatibility with non referenced AVPacket
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-06-24 08:03:26 +02:00
Luca Barbato f963f701d9 ogg: relax demuxer conformance checks
Some samples in the wild are missing headers that are expected by the
specification but in practice do not affect decoding.
2013-06-22 20:54:59 +02:00
Kostya Shishkov ee16a0ced0 smacker: check frame size validity
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:57:31 +02:00
Kostya Shishkov 58c95448e4 smacker: pad the extradata allocation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:57:31 +02:00
Luca Barbato df9f22d42b avf: move url utility functions in a separate file 2013-06-16 15:01:39 +02:00
Luca Barbato 12db891dcd avf: move ff_write_chained to mux.c 2013-06-16 14:41:07 +02:00
Luca Barbato 508998f7d5 avf: move riff tags accessors where they belong 2013-06-16 14:41:07 +02:00
Luca Barbato ec7c51c786 avf: move ff_http_match_no_proxy to network
It is only used by network protocols.
2013-06-16 14:41:00 +02:00
Luca Barbato afc8685395 avf: split off format register and lookup function 2013-06-16 14:00:40 +02:00
Luca Barbato 42d73f7f6b 4xm: do not overread while parsing header
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-06-12 14:45:46 +02:00
Luca Barbato e7a44f87d0 4xm: refactor fourxm_read_header
Split sound and video tag parsing in separate functions.
2013-06-12 14:45:46 +02:00
Luca Barbato e6496ea7e7 4xm: K&R formatting cosmetics 2013-06-12 14:45:46 +02:00
Sean McGovern 8835c554ff matroskadec: introduce resync function.
This allows handling matroska files with errors.
Fixes test4.mkv and test7.mkv from the official Matroska test suite,
and by extension Bugzilla #62.

Based on a patch by Reimar Doffinger <Reimar.Doeffinger@gmx.de>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-06-10 20:51:35 +02:00
Yusuke Nakamura 2578f1efd6 riff: Support ULH0 and ULH2 fourccs.
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2013-06-10 09:37:53 +02:00
Martin Storsjö aa2c918f7d rtpdec: Fix the alphabetical ordering in registering depacketizers
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-06 19:56:05 +03:00
Martin Storsjö 2681924b0f libavformat: Fix standalone compilation of the webm muxer
The missing object file was added to the matroska muxer already, but
not to the webm muxer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-06 19:55:53 +03:00
Anton Khirnov e816aaacd6 apetag: use int64_t for filesize
CC: libav-stable@libav.org
2013-06-04 17:20:19 +02:00
Luca Barbato 9835abb6d6 network: uniform ff_listen_bind and ff_listen_connect
Document the functions and have both use a millisecond timeout and
check for interrupt.
2013-06-04 14:56:52 +02:00
Andrey Semashev 7c020e1ad3 movenc: Grow the frag_info array in chunks
Previously it was grown one element at a time, which leads to
excessive reallocations.

Bug-Id: 525
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-04 15:05:42 +03:00
Andrey Semashev ab1189766a movenc: Increase the cluster array allocation by doubling
The previous allocation increment of 16384 meant that the cluster
array was allocated for 0.6 MB initially, which is a bit excessive
for cases with fragmentation where only a fraction of that ever
actually is used.

Therefore, start off at a much smaller value, and increase by
doubling (to avoid reallocating too often when writing long
non-fragmented mp4 files).

Bug-Id: 525
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-04 15:05:31 +03:00
Andrey Semashev 3b4feac1ec movenc: Keep track of the allocated size for the cluster array
When writing fragmented mp4, the cluster array is reset when a
fragment is written. Instead of starting off reallocating the
array only based on the number of current elements in it, keep
track of how many elements there were allocated earlier.

This avoids reallocating this array needlessly when writing
fragmented mp4 files.

Bug-Id: 525
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-04 15:05:12 +03:00
Martin Storsjö 9683e37cd5 movenc: Change the track struct name to match the typedef
This makes the struct name (which isn't used anywhere) match the
name of the typedef, as for all the other structs declared in this
header.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-06-03 11:08:18 +03:00
Kostya Shishkov 2d66a58ccd Go2Webinar decoder 2013-06-03 09:24:55 +02:00
Diego Biurrun 9f84ed8cc3 nsvdec: Remove commented-out debug cruft 2013-06-02 18:11:58 +02:00
Luca Barbato f849a77e67 network: factor out connect-listening code
Introduce ff_listen_connect, to be shared with the other
non-tcp network protocols.
2013-06-01 15:29:53 +02:00
Luca Barbato 28306e6d62 network: factor out bind-listening code
Introduce ff_listen_bind, to be shared with the other non-tcp
network protocols.
2013-06-01 15:29:53 +02:00
Kostya Shishkov de421b2085 use my full first name instead of short one in copyrights 2013-06-01 13:38:50 +02:00
Anton Khirnov 2d2d6a4883 lavf: add a raw WavPack muxer. 2013-05-28 18:19:19 +02:00
Anton Khirnov 88de0c7901 apetag: add support for writing APE tags
This will be useful in the WavPack muxer.
2013-05-28 18:19:03 +02:00
Anton Khirnov 01656fd476 matroskaenc: support muxing WavPack 2013-05-28 18:18:57 +02:00
Anton Khirnov 794ca87d2b wvdec: split block header parsing into a separate file
It will be reused by other muxers and demuxers.
2013-05-28 17:47:59 +02:00
Anton Khirnov 0a1a94450a lavf: rename wv.c to wvdec.c
wv.c will be used for shared wavpack functions.
2013-05-28 17:47:30 +02:00
Kostya Shishkov 851bc1d6be smacker: assign video frame PTS 2013-05-28 09:03:41 +02:00
Anton Khirnov 9b6f47c448 matroskadec: export full wavpack blocks.
This allows us to get rid of demuxer-specific hacks in the decoder and
will allow streamcopy from matroska once we have a wavpack muxer.
2013-05-28 08:14:35 +02:00
Anton Khirnov 5074f4545c wavpack demuxer: export full wavpack blocks.
Currently the demuxer shaves the blocks and exports only the
information that is useful to the decoder.

Exporting the blocks just as they are stored is simpler to understand
and will make remuxing wavpack easier.
2013-05-28 08:14:05 +02:00
Anton Khirnov c330eba84c lavf: preserve side data when parsing packets. 2013-05-28 08:00:07 +02:00
Anton Khirnov 564b7e0c00 matroskadec: silently skip CodecState element.
mkvmerge apparrently uses it for mpeg1/2 video, but it contains the same
information as CodecPrivate, so it can be ignored.
2013-05-27 21:25:53 +02:00
Kostya Shishkov c3c08baefb smacker: fix off-by-one error in palette expanding code 2013-05-27 18:19:08 +02:00
Anton Khirnov 90f9a5830b w32pthreads: move from lavc to compat/
It will be used in other places than lavc.
2013-05-24 09:26:54 +02:00
Eli Friedman 350914fc80 Escape 130 (RPL) decoder
Some fixes provided by Paul B Mahol <onemda@gmail.com>
and Michael Niedermayer <michaelni@gmx.at> and me.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2013-05-18 07:12:56 +02:00
Kostya Shishkov 1232a1647a Apple Intermediate Codec decoder 2013-05-17 06:31:05 +02:00
Jeremy Hinegardner 40bbbce7e8 movenc: Don't add base_data_offset in tfhd for PIFF files
According to the PIFF specification[1] the base_data_offset field MUST be
omitteed. See section 5.2.17. Since the ISMV files created by libavformat
state that they are 'piff' compatible via 'ftyp' box, this needs to be
corrected.

[1] http://www.iis.net/learn/media/smooth-streaming/protected-interoperable-file-format

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-17 00:28:50 +03:00
Diego Biurrun 2832ea26f3 Remove commented-out debug #define cruft 2013-05-16 00:23:30 +02:00
Diego Biurrun d46c588f3c Remove commented-out #includes 2013-05-15 23:01:21 +02:00
Yoshihisa Uchida 3dff1bf99c mmf: Write metadata into an Optional Data chunk
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-14 17:14:38 +02:00
Luca Barbato ee9a4dff4a mmf: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-09 16:12:58 +02:00
Luca Barbato db9aee6ccf oma: properly forward errors in oma_read_packet
Prevent spurios EIO on EOF.

CC:libav-stable@libav.org
2013-05-07 14:37:32 +02:00
Luca Barbato 6f98508e2b oma: return meaningful errors 2013-05-07 14:37:32 +02:00
Luca Barbato e0c53c3408 nut: use meaningful error values
Fix the mispresented EINVAL for EOF on partial files, among the other.
2013-05-07 14:37:32 +02:00
Luca Barbato ac87eaf856 wav: Always seek to an even offset
RIFF chunks are aligned to 16bit according to the specification.

Bug-Id:500
CC:libav-stable@libav.org
2013-05-06 09:14:43 +02:00
Luca Barbato 46c1917350 nut: use a define for the nut version
Ease switching version in the future and make evident why that value.
2013-05-06 09:14:43 +02:00
Diego Biurrun 7abd35a1ff avformat: Add av_cold attributes to init functions missing them 2013-05-05 18:33:04 +02:00
Diego Biurrun c0c2b96c13 sctp: Add a note on why sctp_recvmsg and sctp_sendmsg have ff_-prefixes 2013-05-04 22:22:17 +02:00
Diego Biurrun a8a45dfe25 avs: Increase magic value score above file extension score
This should fix misdetection of AVS files as AviSynth scripts
when AviSynth support is enabled (Bugzilla #357).
2013-05-04 21:51:00 +02:00
Diego Biurrun e0f8be6413 avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate 2013-05-04 21:43:06 +02:00
Diego Biurrun 4d7ed3e735 build: output-example: Add avutil to ELIBS in link command
output-example links against swscale, which depends on avutil.  In standard
configurations, by pure good luck, the libs before swscale pull in all of
swscale's dependencies and linking succeeds.  However, in some configurations
like --disable-asm this is not the case and linking fails.

Hardcode the dependency to avoid a more general Makefile refactoring.
2013-05-04 21:19:49 +02:00
Luca Barbato 72e228b274 nut: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-04 20:01:08 +02:00
Luca Barbato 69467fb64b wav: return meaningful errors 2013-05-03 19:56:06 +02:00
Diego Biurrun a5f8873620 silly typo fixes 2013-05-03 18:26:12 +02:00
Luca Barbato af4cc2605c id3v2: check for end of file while unescaping tags
Prevent a serious out of buffer bound write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-05-03 10:21:27 +02:00
Anton Khirnov e3b225a4fe matroskaenc: add an option to put the index at the start of the file 2013-05-03 08:32:35 +02:00
Anton Khirnov 0574bc06d2 matroskaenc: cosmetics, reorder the #includes 2013-05-03 08:26:55 +02:00
Luca Barbato 13f57a4d88 wav: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-02 19:04:22 +02:00
Luca Barbato 0671adbb18 id3v2: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-05-02 11:02:45 +02:00
Diego Biurrun e926b5ceb1 avformat: Drop unnecessary ff_ name prefixes from static functions 2013-04-30 16:16:23 +02:00
Luca Barbato c140105410 oma: K&R formatting cosmetics 2013-04-27 10:53:24 +02:00
Anton Khirnov cf679b9476 hls, segment: fix splitting for audio-only streams.
CC:libav-stable@libav.org
2013-04-27 10:19:04 +02:00
Luca Barbato c2cb01d418 lavf: introduce AVFMT_TS_NEGATIVE
Most formats do not support negative timestamps, shift them to avoid
unexpected behaviour and a number of bad crashes.

CC:libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-04-25 10:13:27 +02:00
Diego Biurrun a0d5ca4f0a mxfenc: Use correct printf format specifier for int64_t
libavformat/mxfenc.c:1861:9: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'int64_t' [-Wformat]
2013-04-22 12:05:09 +02:00
Luca Barbato b845f5e97b riff: Factor out WAVEFORMATEX parsing
Makes the code simpler to follow.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Peter Ross 516089d5d8 riff: Add ACTRAC3+ guid
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Peter Ross a3bf80a5ae riff: Perform full lookup on WAVEFORMATEXTENSIBLE subformat guid
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Peter Ross e544782623 riff: Move guid structs and helper functions into riff
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Luca Barbato 8e329dba37 riff: check for eof if chunk size and code are 0
Prevent an infinite loop.

Inspired by a patch from Michael Niedermayer

CC: libav-stable@libav.org

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:30 +02:00
Luca Barbato 1c88617b94 riff: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-21 18:20:12 +02:00
Michael Niedermayer 505642f182 mp3dec: fallback to generic seeking when a TOC is not present
Fixes seeking without a Xing/Info header.

CC: libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-04-19 09:26:34 +02:00
Rafaël Carré 5b27c307e7 flvenc: do not mux more than one stream per type
FLV does not support multiple audio or video streams.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-04-16 10:31:38 +02:00
Anton Khirnov 9e6b5e61a0 img2enc: add an option for overwriting one file with subsequent images
Based on a patch by Michael Niedermayer <michaelni@gmx.at>.
2013-04-11 12:30:44 +02:00
Diego Biurrun ac9362c5d9 Move misplaced file author information where it belongs 2013-04-11 02:42:11 +02:00
Martin Storsjö fc792308c5 srtp: Include rtpdec.h for RTP_MAX_PACKET_LENGTH
This was missed from 350ad50b - this fixes building the fate-srtp
test.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-09 12:04:39 +03:00
Andrew Van Til 0e729b2290 rtpdec: Increase max rtp packet size to 8192
This fixes connecting to "Ceton InfiniTV4 PCIe & USB".

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-09 10:36:56 +03:00
Andrew Van Til 350ad50bf4 lavf: Use RTP_MAX_PACKET_LENGTH instead of 1500
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-09 10:36:43 +03:00
Nicolas Bertrand 5e46f6b5b7 img2: Add j2k file extension for JPEG 2000
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-04-04 19:47:05 +02:00
Anton Khirnov f8080bd13b xmv: do not leak memory in the error paths in xmv_read_header()
CC: libav-stable@libav.org
2013-04-04 07:54:45 +02:00
Anton Khirnov d1016dccdc xmv: check audio track parameters validity.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-04-04 07:54:35 +02:00
Anton Khirnov 8d617b11cf id3v2: pad the APIC packets as required by lavc.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-04-04 07:54:15 +02:00
Anton Khirnov dbb1425811 lavf: make sure stream probe data gets freed.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-04-04 07:54:00 +02:00
Luca Barbato 25a80a931a matroska: pass the lace size to the matroska_parse_rm_audio
Each lace must be independent according to the specification.

Fix heap-buffer-overflow in matroska_parse_block for
corrupted real media in mkv files.

Stricter check than fc43c19a56

CC: libav-stable@libav.org
2013-04-03 12:34:38 +02:00
Luca Barbato 8a96df7b70 matroska: fix a corner case in ebml-lace parsing
Make sure we notice when the lace_size[n] is a negative value.

CC: libav-stable@libav.org
2013-04-03 12:33:15 +02:00
Dale Curtis fc43c19a56 matroska: Update the available size after lace parsing
Fix heap-buffer-overflow in matroska_parse_block for
corrupted real media in mkv files.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-04-03 12:33:01 +02:00
Luca Barbato 0933fd1533 oma: Validate sample rates
The sample rate index is 3 bits even if currently index 5, 6 and 7 are
not supported.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-03-31 16:10:52 +02:00
Justin Ruggles e46a2a7309 flvdec: read audio sample size and channels metadata
This is needed in order for the FLV demuxer not to detect a codec change when
using the "flv_metadata" option.
2013-03-28 06:27:28 -04:00
Justin Ruggles c3d0157753 flvdec: use the correct audio codec id when parsing metadata 2013-03-28 06:27:28 -04:00
Hendrik Leppkes 85a46ad685 win32: Use 64-bit fstat/lseek variants for MSVC as well
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-27 19:05:58 +02:00
Reimar Döffinger ad04025987 win32: Make ff_win32_open more robust
- Make MultiByteToWideChar fail when it encounters invalid encoding.
  Without this, invalid characters might just be skipped
- When MultiByteToWideChar fails, assume the file name is in CP_ACP
  and open it via normal open function, even when the file will be
  written
- When malloc fails return error instead of crashing

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-27 18:54:46 +02:00
Reimar Döffinger e9cc988395 win32: Allow other programs to open the same files
In order to match Linux behaviour better our Windows-specific
open() replacement should disable Windows default file locking.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-27 18:51:51 +02:00
Kostya Shishkov 472391b9a7 ape: use correct context for the bit table printed in debug 2013-03-27 16:20:08 +01:00
Martin Storsjö f1e9398621 lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo
Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-26 09:50:02 +02:00
Kostya Shishkov 613a37eca4 ape: 3.80-3.92 decoding support 2013-03-25 18:40:56 +01:00
Martin Storsjö a5e6080a8d rtmp: Pass the parameters to do_adobe_auth in the right order
do_adobe_auth takes the parameters in the order "opaque, challenge".

Due to the way they are treated, this didn't matter in the tested
setups though - if both are set, we only use one. In the tested
setups (Wowza and Akamai) either one of them were null or they
were both set to the same value, which is why this worked before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-20 12:00:28 +02:00
Anton Khirnov 3cd93cc7b8 Revert "asfenc: return error on negative timestamp"
This reverts commit d1bec33b46, it breaks
FATE.
2013-03-19 11:04:55 +01:00
Kostya Shishkov 50c449ac24 iff: validate CMAP palette size
Fixes CVE-2013-2495

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
2013-03-18 10:48:29 +01:00
Luca Barbato d1bec33b46 asfenc: return error on negative timestamp
According to the specification the timestamp is represented by a 32bit
unsigned.

CC: libav-stable@libav.org
2013-03-18 10:48:23 +01:00
Anton Khirnov aa3c779984 lavf: sanity check size in av_get/append_packet().
To avoid allocating ridiculous amounts of memory for corrupted files,
read the input in chunks limited to filesize or an arbitrary large
amount when that is not known (chosen to be 50M).
2013-03-15 20:05:04 +01:00
Xi Wang 8425d693ee flacdec: simplify bounds checking in flac_probe()
Simplify `p->buf > p->buf + p->buf_size - 4' as `p->buf_size < 4'.
Avoid a possible out-of-bounds pointer, which is undefined behavior
in C.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-15 12:51:57 +01:00
Kostya Shishkov c42e262513 add support for Monkey's Audio versions from 3.93 2013-03-15 09:50:42 +01:00
Can Wu 81cf53e133 mpegts: add support for stream_type 0x42, which is CAVS
This allows demuxing and muxing of CAVS TS streams.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-15 09:33:24 +01:00
Diego Biurrun 1ae07959ab rsodec: Use avpriv_report_missing_feature() where appropriate 2013-03-13 21:20:12 +01:00
Diego Biurrun 1ecdf8912b avformat: av_log_ask_for_sample() ---> avpriv_request_sample() 2013-03-13 20:42:21 +01:00
Diego Biurrun 63d744e2be av_log_missing_feature() ---> avpriv_report_missing_feature() 2013-03-13 20:42:21 +01:00
Luca Barbato 37cb3b180a matroskadec: request a read buffer for the wav header
Solve an infiniloop.

CC: libav-stable@libav.org
2013-03-12 18:58:06 +01:00
Diego Biurrun a4472ac01e Add informative messages to av_log_ask_for_sample calls lacking them 2013-03-12 11:09:45 +01:00
Diego Biurrun 8f10f1a6dc anm: Get rid of some very silly goto statements 2013-03-12 11:05:28 +01:00
Anton Khirnov 85a5bc054c lavf: remove disabled FF_API_R_FRAME_RATE cruft 2013-03-11 18:23:50 +01:00
Anton Khirnov 7b486ab13b lavf: remove disabled FF_API_AV_GETTIME cruft 2013-03-11 18:23:18 +01:00
Anton Khirnov 32e5194969 lavf: remove disabled FF_API_INTERLEAVE_PACKET cruft 2013-03-11 18:23:10 +01:00
Anton Khirnov 435c2a31ad lavf: remove disabled FF_API_READ_PACKET cruft 2013-03-11 18:23:02 +01:00
Anton Khirnov c7e044c61b lavf: remove disabled FF_API_APPLEHTTP_PROTO cruft 2013-03-11 18:22:54 +01:00
Anton Khirnov 0a7c4daf46 lavf: remove disabled FF_API_CLOSE_INPUT_FILE cruft 2013-03-11 18:22:45 +01:00
Martin Storsjö f1af3d19a7 output-example: Update to use encode_video2 instead of the now dropped encode_video
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-08 13:42:45 +01:00
Anton Khirnov 6c7d339afc tty: set avg_frame_rate.
The container does not store any timestamps and is CFR-only.
2013-03-08 08:11:05 +01:00
Anton Khirnov 0651e892e1 Replace remaining includes of audioconvert.h with channel_layout.h 2013-03-08 07:42:13 +01:00
Anton Khirnov d8b31be6ca Add the bumps and APIchanges entries for reference counted buffers changes. 2013-03-08 07:41:49 +01:00
Anton Khirnov 1afddbe59e avpacket: use AVBuffer to allow refcounting the packets.
This will allow us to avoid copying the packets in many cases.

This breaks ABI.
2013-03-08 07:33:45 +01:00
Alexander Kojevnikov eae0879d96 mp3dec: Fix VBR bit rate parsing
When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag.

When parsing the stream, don't override the bit rate if it's already set,
otherwise calculate the mean bit rate from parsed frames. This way, the bit
rate will be set correctly both for CBR and VBR streams.

CC:libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-08 07:32:11 +01:00
Reimar Döffinger efa7f42020 Use the avstring.h locale-independent character type functions
Make sure the behavior does not change with the locale.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 15:16:36 +02:00
Martin Storsjö 8fbab7a6c8 rtpdec: Initialize some variables to silence compiler warnings
The warnings are false positives, older gcc versions (such as 4.5)
think the variables can be used uninitialized while they in
practice can't, while newer (4.6) gets it right.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-02 21:23:52 +02:00
Martin Storsjö c5a738ca4e flvdec: Check the return value of a malloc
The callers of this function can't report errors sanely. If this
one malloc fails, don't write the extradata byte, make sure we
try to malloc it the next time we're called instead, and make sure
we still consume the input data byte.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-02 00:39:37 +02:00
Martin Storsjö c91c63b538 flvdec: Don't read the VP6 header byte when setting codec type based on metadata
This header byte is only present when actually reading a VP6 frame,
not when reading the codec type field in the metadata. This
potential bug has been present since 5b54a90c.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-02 00:39:36 +02:00
Martin Storsjö 5c8696555a lavf: Add a fate test for the noproxy pattern matching
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-27 21:32:14 +02:00
Martin Storsjö de9cd1b173 lavf: Handle the environment variable no_proxy more properly
The handling of the environment variable no_proxy, present since
one of the initial commits (de6d9b6404), is inconsistent with
how many other applications and libraries interpret this
variable. Its bare presence does not indicate that the use of
proxies should be skipped, but it is some sort of pattern for
hosts that does not need using a proxy (e.g. for a local network).

As investigated by Rudolf Polzer, different libraries handle this
in different ways, some supporting IP address masks, some supporting
arbitrary globbing using *, some just checking that the pattern matches
the end of the hostname without regard for whether it actually is
the right domain or a domain that ends in the same string.

This simple logic should be pretty similar to the logic used by
lynx and curl.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-27 21:32:13 +02:00
Anton Khirnov 56daf10e03 mov: use the format context for logging.
CC:libav-stable@libav.org
2013-02-23 13:05:16 +01:00
Anton Khirnov 1ef0e8a6bf asfdec: do not assume every AVStream has a corresponding ASFStream
This won't be true for ID3 attached picture.

Also stop allocating now useless dummy ASFStreams for ASF native
attached pictures.
2013-02-09 18:57:21 +01:00
Vladimir Pantelic f5fac6f777 asfdec: support reading ID3v2 tags in ASF files
Yes, these files do exist

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-09 18:57:21 +01:00
Vladimir Pantelic 84b721db36 asfdec: also read Metadata Library Object
In some ASF files this objects holds cover art and other tags. Compared to
Metadata Object it can also hold GUIDs, but we ignore these for now.

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-09 18:57:21 +01:00
Vladimir Pantelic 61f9ad2dfc asfdec: read the full Metadata Object, not just aspect ratio information
Use the same get_tag()/get_value() as for the Extended Content Description
but handle the 16 bit vs 32 bit difference for type 2 (BOOL)

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-09 18:57:21 +01:00
Vladimir Pantelic 36fab50e90 asfdec: silence a warning
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-09 18:57:21 +01:00
Diego Biurrun 48a4ffa722 asf: K&R formatting cosmetics 2013-02-06 09:48:51 +01:00
Diego Biurrun 6c1a7d07eb Use proper "" quotes for local header #includes 2013-02-01 12:51:15 +01:00
Anton Khirnov 9ec8971060 bink demuxer: set framerate. 2013-02-01 12:42:17 +01:00
Anton Khirnov 1730ca2eca bink demuxer: check malloc return value 2013-02-01 12:41:38 +01:00
Diego Biurrun 0f5b0b4178 avisynth: Change demuxer name to avoid conflicts with AVS 2013-01-31 11:19:22 +01:00
Martin Storsjö 61d36761ef movenc: Simplify code by using avio_wb24
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-30 13:45:45 +02:00
Anton Khirnov 729b37149c mvi: set framerate
This container does not store timestamps and thus supports CFR only.
2013-01-29 07:31:55 +01:00
Martin Storsjö 4a4a7e138c rtpenc_chain: Use the original AVFormatContext for getting payload type
In ff_rtp_get_payload_type, the AVFormatContext is used for checking
whether the payload_type or rtpflags options are set. In rtpenc_chain,
the rtpctx struct is a newly initialized struct where no options have
been set yet, so no options can be fetched from there.

All muxers that internally chain rtp muxers have the "rtpflags" field
that allows passing such options on (which is how this worked before
8034130e06), so this works just as intended.

This makes it possible to produce H263 in RFC2190 format with chained
RTP muxers.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-24 11:31:36 +02:00
Martin Storsjö 932117171f rtp: Make sure the output format pointer is set
Not sure if this actually happens, but we do the same check when
checking payload_type further above in the function, so it might
be needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-24 11:31:35 +02:00
Martin Storsjö e90820d4f8 rtp: Make sure priv_data is set before reading it
This fixes crashes with muxing H263 into RTSP.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-23 23:30:58 +02:00
Xi Wang cf29f49d8a rtpenc: fix overflow checking in avc_mp4_find_startcode()
The check `start + res < start' is broken since pointer overflow is
undefined behavior in C.  Many compilers such as gcc/clang optimize
away this check.

Use `res > end - start' instead.  Also change `res' to unsigned int
to avoid signed left-shift overflow.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-23 13:51:29 +02:00
Xi Wang ecb918e5f0 rtmp: fix buffer overflows in ff_amf_tag_contents()
A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly. Also change a literal buffer
size to use sizeof, and limit the amount of data copied in another
memcpy call as well.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-23 13:51:28 +02:00
Xi Wang 3cff53369a rtmp: fix multiple broken overflow checks
Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-23 13:51:27 +02:00