Carl Eugen Hoyos
ced0d6c14d
Use correct msvc type specifiers for ptrdiff_t and size_t.
...
The Windows runtime aborts if it finds %t or %z.
Fixes ticket #3472 .
Reviewed-by: Ronald Bultje
11 years ago
Michael Niedermayer
459db51271
avformat/ape: free packet on avio_read() failure
...
Fixes memleak
Fixes: msan_uninit-mem_7fcc198b365b_8417_sh3.ape
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
3cfa310c5d
avformat/ape: zero seektable&bittable and warn when they where only partially filled
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fcc198b365b_8417_sh3.ape
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b570835296
avformat/ape: check version in probe
...
Fixes probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
a807c68253
avformat: use ff_alloc_extradata()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Martin Storsjö
183b9d843a
ape: Don't allow the seektable to be omitted
...
The seektable is required for filling in ape->frames[i].pos
further down.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Anton Khirnov
488b2984fe
ape demuxer: check for EOF in potentially long loops
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
wm4
a5ef7960fc
ape: check avio_read() return value
...
This sets pkt->size to absurd values on failure otherwise.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Kostya Shishkov
472391b9a7
ape: use correct context for the bit table printed in debug
12 years ago
Carl Eugen Hoyos
7857ddceec
Fix a typo in the Monkey's Audio demuxer.
12 years ago
Kostya Shishkov
613a37eca4
ape: 3.80-3.92 decoding support
12 years ago
Kostya Shishkov
c42e262513
add support for Monkey's Audio versions from 3.93
12 years ago
Paul B Mahol
7510a9a466
lavf/apedec: return meaningful error codes
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
jamal
732dfc7660
lavf/ape: Fix stream duration calculation
...
Fixes ticket #1662
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Anton Khirnov
980e65f119
ape: create audio stream before reading tags.
...
Tags may contain attached picture, which will be exported as video
streams.
This ensures that the audio stream is always the first.
13 years ago
Michael Niedermayer
e7cb161515
ape: Fix null ptr dereference with files missing a seekatable.
...
Such files are currently not supported as the table is used at several points
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
20234a4bd7
cosmetics: Align muxer/demuxer declarations
...
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Justin Ruggles
9727264220
ape: do not set AVCodecContext.frame_size.
...
prevents lavf from setting incorrect packet durations.
13 years ago
Justin Ruggles
f1c3d4a68a
ape: skip packets with invalid size
13 years ago
Justin Ruggles
ac3f8d317c
ape: calculate final packet size instead of guessing
...
Calculates based on total file size and wavetaillength from the header.
Falls back to multiplying finalframeblocks by 8 instead of 4 so that it will
at least be overestimating for 24-bit. Currently it can underestimate the
final packet size, leading to decoding errors.
13 years ago
Justin Ruggles
c2c316158f
ape: stop reading after the last frame has been read
...
This avoids buffer overread when the last packet size estimate is too small.
13 years ago
Justin Ruggles
66f7be3603
ape: return AVERROR_EOF instead of AVERROR(EIO) when demuxing is finished
13 years ago
Justin Ruggles
1bc035bc03
ape: return error if seeking to the current packet fails in ape_read_packet()
13 years ago
Paul B Mahol
86b57e4efe
ape: fix seeking
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Anton Khirnov
6e9651d106
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
13 years ago
Anton Khirnov
c3f9ebf743
lavf: make av_set_pts_info private.
...
It's supposed to be called only from (de)muxers.
13 years ago
Anton Khirnov
3b3bbdd3e6
lavf,lavd: replace av_new_stream->avformat_new_stream part I.
...
Trivial replacements with sed are done in this commit:
sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
13 years ago
Laurent Aimar
273aab99bf
ape demuxer: fix segfault on memory allocation failure.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Laurent Aimar
1632a576e6
Fixed segfault on memory allocation failure in ape demuxer.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
ab3d241be1
ape: adjust some printf format strings to correctly match argument types
14 years ago
Anton Khirnov
dfc2c4d900
lavf: use designated initialisers for all (de)muxers.
...
It's more readable and less prone to breakage.
14 years ago
Diego Biurrun
f190f676bc
Replace custom DEBUG preprocessor trickery by the standard one.
14 years ago
Diego Biurrun
b0a4e5f9e7
Employ correct printf format specifiers, mostly in debug output.
14 years ago
Carl Eugen Hoyos
ab088f7d28
ape: Allow demuxing of files with metadata tags.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Reimar Döffinger
8c3651f4a5
Fix printf format string, fixes a warning.
14 years ago
Anton Khirnov
8978fedaee
avio: introduce an AVIOContext.seekable field
...
Use it instead of url_is_streamed and AVIOContext.is_streamed.
14 years ago
Kostya Shishkov
29a290439b
ape: check that number of seektable entries is equal to number of frames
...
fixes issue2480
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Carl Eugen Hoyos
88f8805f3e
Allow demuxing of APE files with metadata tags.
...
Fixes ticket 11.
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Anton Khirnov
45a8a02a41
lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Kostya
8312e3fc90
Do not attempt to decode APE file with no frames
...
This fixes invalid reads/writes with this sample:
http://packetstorm.linuxsecurity.com/1103-exploits/vlc105-dos.txt
14 years ago
Kostya Shishkov
1c31b26bdf
Do not attempt to decode APE file with no frames.
...
This fixes invalid reads/writes with this sample:
http://packetstorm.linuxsecurity.com/1103-exploits/vlc105-dos.txt
14 years ago
Anton Khirnov
66e5b1df36
avio: deprecate url_feof
...
AVIOContext.eof_reached should be used directly instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
74b3f67c9c
lavf: replace all uses of url_fskip with avio_seek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e356fc57a2
)
14 years ago
Anton Khirnov
f59d8ff8cd
avio: avio_ prefix for url_fseek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b4aa5dac8
)
14 years ago
Anton Khirnov
e356fc57a2
lavf: replace all uses of url_fskip with avio_seek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
6b4aa5dac8
avio: avio_ prefix for url_fseek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e63a362857
avio: avio_ prefixes for get_* functions
...
In the name of consistency:
get_byte -> avio_r8
get_<type> -> avio_r<type>
get_buffer -> avio_read
get_partial_buffer will be made private later
get_strz is left out becase I want to change it later to return
something useful.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b7effd4e83
)
14 years ago
Anton Khirnov
b7effd4e83
avio: avio_ prefixes for get_* functions
...
In the name of consistency:
get_byte -> avio_r8
get_<type> -> avio_r<type>
get_buffer -> avio_read
get_partial_buffer will be made private later
get_strz is left out becase I want to change it later to return
something useful.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago