Michael Niedermayer
41540b36a1
bitstream: add get_bits64() to support reading more than 32 bits at once
...
Also remove a duplicate function in the MPEG-TS demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Janne Grunau
8cc2fa1e5d
mov: validate number of DataReferenceBox entries against box size
...
Avoids a 2G memory allocation and parsing of random data in
mov_read_dref(). The fuzzed sample sample.mp4_s224424 triggers this.
2012-12-07 11:43:28 +01:00
Janne Grunau
80b6b31417
mov: compute avg_frame_rate only if duration is known
...
Fixes an assert in fuzzed sample sample.mp4_s265930.
2012-12-07 11:43:28 +01:00
Janne Grunau
54c7fe6d68
raw demuxer: initialize end of partial packets
2012-12-05 00:02:43 +01:00
Anton Khirnov
cb45553f57
Remove pointless #undefs of previously forbidden functions.
2012-12-04 21:40:22 +01:00
Diego Biurrun
62641dce71
build: cosmetics: Move CONFIG_RTPDEC entry to a more suitable place
2012-12-03 19:32:03 +01:00
Diego Biurrun
31f16dc1a1
build: Make the ISMV muxer select the MOV muxer
...
They share the same code, so building one w/o the other makes no sense.
2012-12-03 01:20:10 +01:00
Diego Biurrun
cc7d5cfeec
img2: K&R formatting cosmetics
...
Also introduce local img_ namespace to simplify debugging.
2012-11-29 17:15:57 +01:00
Diego Biurrun
2c4593dd13
rtpenc_chain: Remove unused variable
2012-11-28 18:17:49 +01:00
Justin Ruggles
ab87d9b667
nuv: check for malloc failure when allocating extradata
...
Also make sure extradata is freed in the case where multiple
NUV_EXTRADATA frame types are found. This may not happen in practice,
but it could happen in a malformed stream, which would lead to a memleak
if not handled.
2012-11-28 11:18:50 -05:00
Justin Ruggles
838ed296df
nuv: use the stream indices generated by avformat_new_stream()
2012-11-28 11:18:50 -05:00
Justin Ruggles
c74f81786d
nuv: cosmetics: pretty-printing
2012-11-28 11:18:50 -05:00
Justin Ruggles
5c7bf2ddde
lavf: move nuv fourcc audio tags from riff to nuv
2012-11-28 11:18:50 -05:00
Justin Ruggles
261e9348ef
lavf: add a common function for selecting a pcm codec from parameters
2012-11-28 11:18:50 -05:00
Justin Ruggles
bfe5454cd2
lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h
2012-11-28 11:18:49 -05:00
Justin Ruggles
cdaa1f84fb
lavf: move "MP3 " fourcc from riff to nut
...
Original commit, 7b24f9b
, says it was added because it is used in libnut.
2012-11-28 11:18:49 -05:00
Michael Niedermayer
2fe0094e0b
wavenc: write fact chunk sample count at the correct file position
...
Fixes curruption of metadata in the INFO chunk.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-11-26 19:11:10 -05:00
Justin Ruggles
259d8c5647
riff: do not add empty metadata tags in INFO chunk
2012-11-26 19:08:51 -05:00
Justin Ruggles
3c370f5abc
riff: only warn on a bad INFO chunk code size instead of failing
...
fixes Bug 392
2012-11-26 19:08:51 -05:00
Janne Grunau
7709ce029a
lavf: avoid integer overflow in ff_compute_frame_duration()
...
Scaling the denominator instead of the numerator if it is too large
loses precision. Fixes an assert caused by a negative frame duration in
the fuzzed sample nasa-8s2.ts_s202310.
CC: libav-stable@libav.org
2012-11-26 10:26:08 +01:00
Paul B Mahol
b491da18d1
yop: fix typo
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-11-25 11:10:52 -05:00
Diego Biurrun
ddb009425c
riff: Make ff_riff_tags static and move under appropriate #ifdef
...
The table is not used outside the file.
2012-11-25 13:32:10 +01:00
Anton Khirnov
9ae80e6a9c
id3v2: fix reading unsynchronized frames.
...
Current code would incorrectly process e.g. 'ff 00 ff 00 ff' to
'ff ff ff', while it should be 'ff ff 00 ff'.
Fixes Bug 395.
CC: libav-stable@libav.org
2012-11-22 13:40:04 +01:00
Xi Wang
b655cfefaf
apetag: fix error handling in ff_ape_parse_tag()
...
The following error handling is broken due to signedness.
int file_size;
uint32_t tag_bytes;
int64_t tag_start;
...
tag_start = file_size - tag_bytes - APE_TAG_FOOTER_BYTES;
if (tag_start < 0) { ... }
Note that tag_bytes is unsigned, which makes the right-hand side of
`tag_start = ...' unsigned, too. The 32-bit unsigned value is then
zero-extended to 64 bits. Therefore, tag_start must be non-negative,
and the check (tag_start < 0) is always false, which breaks the error
handling. This patch fixes the check.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-21 14:35:26 +01:00
Janne Grunau
c84cce5a99
mxfdec: fix typo in mxf_read_seek()
...
Check the number of index tables before using byte offset based seeking
instead of the index_tables pointer.
Found by Måns Rullgård <mans@mansr.com>.
2012-11-15 17:37:09 +01:00
Luca Barbato
8034130e06
rtp: set the payload type as stream id
...
Support multiple video/audio streams with different format in the
same session.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-11-14 20:38:51 +01:00
Luca Barbato
3b4296f414
avformat: clarify stream id for muxing
2012-11-14 20:38:51 +01:00
Xi Wang
e8769b37fe
segment: fix NULL pointer dereference in seg_write_header()
...
Since the pointer `oc' is NULL, oc->oformat->name will cause a null
pointer dereference. This patch changes it to seg->oformat->name.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-14 12:33:27 +02:00
Luca Barbato
22a0827dff
hlsenc: stand alone hls segmenter
...
Simplifies usage but has higher latency.
2012-11-13 01:37:05 +01:00
Justin Ruggles
b9629acb6b
yop: set channel layout
2012-11-12 10:33:23 -05:00
Justin Ruggles
935fbb66ef
wtv: set channel layout for mpeg audio
2012-11-12 10:33:23 -05:00
Justin Ruggles
7b48d93e8a
westwood_aud: set channel layout
2012-11-12 10:33:22 -05:00
Justin Ruggles
2ce7f820d4
wc3movie: set channel layout
2012-11-12 10:33:22 -05:00
Justin Ruggles
a94b0267f2
tmv: set channel layout
2012-11-12 10:33:22 -05:00
Justin Ruggles
7f348bd764
tiertexseq: set channel layout
2012-11-12 10:33:22 -05:00
Justin Ruggles
a3949fe11f
swfdec: set channel layout
2012-11-12 10:33:22 -05:00
Justin Ruggles
1c7587728c
sol: set channel layout
2012-11-12 10:33:22 -05:00
Justin Ruggles
bfccd76adb
smacker: set channel layout
2012-11-12 10:33:22 -05:00
Justin Ruggles
57e590e4b8
siff: set channel layout
2012-11-12 10:33:22 -05:00
Justin Ruggles
a634896cf8
sierravmd: set channel layout
2012-11-12 10:33:21 -05:00
Justin Ruggles
c1ac602d53
rtpdec_amr: set channel layout
2012-11-12 10:33:21 -05:00
Justin Ruggles
ce842029ce
rsodec: set channel layout
2012-11-12 10:33:21 -05:00
Justin Ruggles
60a585304c
rmdec: set channel layout for RA version 3
2012-11-12 10:33:21 -05:00
Justin Ruggles
444b79c18a
qcp: set channel layout
2012-11-12 10:33:21 -05:00
Justin Ruggles
b5e3e77711
psxstr: set channel layout
2012-11-12 10:33:21 -05:00
Justin Ruggles
c9759eb426
omadec: set channel layout
2012-11-12 10:33:21 -05:00
Justin Ruggles
d4088efbe2
oggparsespeex: validate channel count and set channel layout
2012-11-12 10:33:20 -05:00
Justin Ruggles
232e9c4c4b
nuv: set channel layout
2012-11-12 10:33:20 -05:00
Justin Ruggles
cc57228e31
mxg: set channel layout
2012-11-12 10:33:20 -05:00
Justin Ruggles
66d7ceb4aa
mvi: set channel layout
2012-11-12 10:33:20 -05:00
Justin Ruggles
f6c6e5aac1
mpc7: set channel layout
2012-11-12 10:33:20 -05:00
Justin Ruggles
f24b0b1b6c
mmf: set channel layout
2012-11-12 10:33:20 -05:00
Justin Ruggles
87199d34db
mm: set channel layout
2012-11-12 10:33:20 -05:00
Justin Ruggles
ef1b23ad21
jvdec: set channel layout
2012-11-12 10:33:20 -05:00
Justin Ruggles
4371131283
iss: set channel layout
2012-11-12 10:33:20 -05:00
Justin Ruggles
41a2d9590d
ipmovie: set channel layout
2012-11-12 10:33:19 -05:00
Justin Ruggles
024e03701c
iff: set channel layout
2012-11-12 10:33:19 -05:00
Justin Ruggles
73e2007f3d
idroqdec: set channel layout
2012-11-12 10:33:19 -05:00
Justin Ruggles
f6c3adde41
gxfdec: set channel layout when applicable
2012-11-12 10:33:19 -05:00
Justin Ruggles
d4a105ae5c
gsmdec: set channel layout
2012-11-12 10:33:19 -05:00
Justin Ruggles
644d8d2e5a
flvdec: set channel layout
2012-11-12 10:33:19 -05:00
Justin Ruggles
d5ca70b103
dv: set channel layout
2012-11-12 10:33:19 -05:00
Justin Ruggles
49e7af06f2
dsicin: set channel layout
2012-11-12 10:33:19 -05:00
Justin Ruggles
a05a63785c
daud: set channel layout
...
Update FATE reference due to WAVE channel mask now being set correctly.
2012-11-12 10:33:18 -05:00
Justin Ruggles
0d09a5848f
cdxl: set channel layout
2012-11-12 10:33:18 -05:00
Justin Ruggles
e8088d6e4b
bmv: set channel layout
2012-11-12 10:33:18 -05:00
Justin Ruggles
2fe804f316
bink: set channel layout
2012-11-12 10:33:18 -05:00
Justin Ruggles
ff50d27a63
bfi: set channel layout
2012-11-12 10:33:18 -05:00
Justin Ruggles
b5d1a15d1b
bethsoftvid: set channel layout
2012-11-12 10:33:18 -05:00
Justin Ruggles
39f0e9b8c6
apc: set channel layout
2012-11-12 10:33:18 -05:00
Justin Ruggles
5595368bcc
amr: set channel_layout
2012-11-12 10:33:18 -05:00
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
2012-11-11 13:35:12 -05:00
Luca Abeni
e004d175fe
rtpenc_aac: Fix calculation of the header size
...
Previously the high end byte was always set to zero. Also get
rid of an unnecessary multiplication (which in practice couldn't
overflow) before shifting.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-08 19:48:32 +02:00
Diego Biurrun
92fec47d69
build: The A64 muxer depends on rawenc.o for ff_raw_write_packet()
2012-11-05 20:48:50 +01:00
Martin Storsjö
d578f94746
rtmp: Use av_strlcat instead of strncat
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-05 15:37:09 +02:00
Anton Khirnov
34871beb5e
matroskadec: do not use avpacket internals
2012-11-02 18:28:56 +01:00
Anton Khirnov
9221efef79
lavf: fix av_interleaved_write_frame() doxy.
...
A sentence was mistakenly inserted in the middle of another sentence.
2012-11-02 18:28:56 +01:00
Anton Khirnov
717a450993
lavf: clarify the lifetime of demuxed packets.
2012-11-02 18:28:56 +01:00
Martin Storsjö
2b831a59d9
rtpdec_vp8: Don't parse fields that aren't used
...
This avoids warnings about unused variables.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-02 10:59:17 +02:00
Anton Khirnov
fdc8672886
audiointerleave: deobfuscate a function call.
...
right above there is if (pkt) {<do stuff>; pkt = NULL}, so pkt is just a
fancy name for NULL at this point.
2012-11-02 07:58:38 +01:00
Anton Khirnov
179a5c37e0
rtpdec: factorize identical code used in several handlers
2012-11-02 07:58:37 +01:00
Anton Khirnov
f70381ab9d
a64: remove interleaved mode.
...
It has been disabled since it was added two years ago.
2012-11-02 07:58:37 +01:00
Luca Barbato
7658295ba3
pixfmt: support more yuva formats
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-30 12:02:42 +01:00
Anton Khirnov
ede4cedf47
dv: fix indentation
2012-10-29 21:35:09 +01:00
Anton Khirnov
14f031d7ec
dv: use AVStream.index instead of abusing AVStream.id
2012-10-29 21:34:05 +01:00
Martin Storsjö
f21d5c905d
rtsp: Avoid a cast when calling strtol
...
This gets rid of this warning:
libavformat/rtsp.c: In function ‘rtsp_parse_transport’:
libavformat/rtsp.c:794: warning: cast discards qualifiers from pointer target type
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-29 17:47:25 +02:00
Luca Barbato
d4bff9f1ab
nut: support textual data
...
Plain text (utf8 encoded) data can be muxed and demuxed in nut.
2012-10-29 12:03:28 +01:00
Luca Barbato
07585ffa62
nutenc: verbosely report unsupported negative pts
...
Additionally use the correct error number.
2012-10-29 10:52:13 +01:00
Martin Storsjö
48f01398ba
rtpdec: Cosmetic cleanup
...
Mainly clean up the RTP statistics code, plus a few other obviously
misindentend lines.
Remove some useless comments, de-doxygenize some comments,
add spacing around operators and fix a typo.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-28 20:50:01 +02:00
Luca Barbato
424b1e7642
yuv4mpeg: reject unsupported codecs
...
The muxer already rejects unsupported pixel formats, reject also
unsupported codecs to prevent dangerous misuses.
2012-10-28 05:07:55 +01:00
Luca Barbato
fce4450dec
nutenc: K&R formatting cosmetics
2012-10-28 05:07:55 +01:00
Mans Rullgard
4cbae57cef
assdec: fix qsort() callback signature
...
This changes the event_cmp() function to the correct signature,
avoiding an ugly cast.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 18:26:28 +01:00
Mans Rullgard
4521645b1a
avio: fix pointer type mismatches in avio_enum_protocols()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 13:43:44 +01:00
Mans Rullgard
be2efe0c7b
udp: use socklen_t where appropriate
...
getsockname() takes a pointer to socklen_t which is not necessarily
int.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 13:11:46 +01:00
Mans Rullgard
9efbfe57e0
network: use HAVE_THREADS instead of local hack
...
HAVE_THREADS is set in config.h if pthreads or w32threads is
available, which presumably the proper condition here.
Also fixes undefined behaviour in preprocessor directives.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 13:11:17 +01:00
Luca Barbato
254056c4ab
pcm: change references to raw to pcm
2012-10-25 17:08:58 +02:00
Janne Grunau
dcdfb8ede3
pcmdec: change default of channels parameter to 1
...
This was previously implicitly done in ff_raw_read_header().
Fixes fate tests with pcm input.
2012-10-25 15:14:40 +02:00
Luca Barbato
587874ef1c
rawdec: remove ff_raw_read_header
...
It is not used anymore and is a kludge.
2012-10-25 14:05:13 +02:00
Luca Barbato
2ef4d586d6
pcmdec: remove dependency from rawdec
...
The code shared is not actually shared with anything else.
2012-10-25 14:05:13 +02:00
Luca Barbato
5f0e161dd6
g722: refactor out of rawdec.c
2012-10-25 14:05:05 +02:00