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