Hugo Beauzée-Luyssen
da7e31a240
rmdec: Check memory allocations from ff_rm_alloc_rmstream()
...
Bug-Id: CID 1257835
10 years ago
Diego Biurrun
daf8cf358a
avformat: Don't anonymously typedef structs
10 years ago
Michael Niedermayer
65b83ce01b
avformat/rmdec: Check the return value of av_get_packet()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
wm4
aab74a38b8
rm: fix memory leak on init failure
...
AVInputFormat.read_close is not called if AVInputFormat.read_header
fails, so this needs to be handled separately.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
03abf55f25
avformat/rmdec: Check for overflow in ff_rm_read_mdpr_codecdata()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
50f9de59a0
avformat/rmdec: rm_read_extradata: add error message for oversized extradata
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Luca Barbato
1c77ead1fb
rm: Use the correct codec_data_size signedness
...
The function takes a size and not an offset.
CC: libav-stable@libav.org
Sample-Id: rm_deadlock.rm
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Michael Niedermayer
a6f730730b
avformat/rmdec: Check codec_data_size
...
Fixes infinite loop
Fixes Ticket4154
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
5badcdf20d
Rename sync() functions in libavformat.
...
Fixes compilation on Android where the sync() definition in
unistd.h interferes with the static definitions in libavformat.
10 years ago
Vittorio Giovara
be42c0b8d5
rmdec: stricter error check to avoid theoretical unitialized use
...
CC: libav-stable@libav.org
Bug-Id: CID 90558
10 years ago
Vittorio Giovara
7207dd8f82
rmdec: check av_new_packet return value
...
CC: libav-stable@libav.org
Bug-Id: CID 733714
10 years ago
Michael Niedermayer
ea7ebadeb7
avformat/rmdec: very basic MLTI support
...
Fixes Ticket2152
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
d34ec64a22
replace calls to url_feof() with avio_feof()
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
73953df71a
Replace av_malloc() and memset(0) by av_mallocz()
11 years ago
Anton Khirnov
ef9732162c
rmdec: do not export anything to AVCodecContext.codec_name
...
That field will be deprecated and the value that is written there is not
particularly useful.
11 years ago
Diego Biurrun
d92024f18f
lavf: more correct printf format specifiers
11 years ago
Michael Niedermayer
77d2a1ca59
avformat/rmdec: when reading audio blocks, dont leave holes when reading fails
...
The fate test is changed because the reference file depends on the use of
non cleared data at the very
end. Alternatively we could upload a new reference file, though that would
then have to be changed every time the handling of a truncated frame changes
or theres a change to error concealment, each time adding a new file ...
Fixes use of uninitialized memory
Fixed: msan_uninit-mem_7f3c02b81363_2787_RLG2_19.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ed1eb9602c
avformat/rmdec: check that sub_packet_size fit in the packet for DEINT_ID_GENR
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fa8c49400d0_3923_audiosig.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
165f96cd2d
avformat/rmdec: move packet allocation down
...
Fixes memleak
Fixes: msan_uninit-mem_7fc5d73327d4_6192_kuerti.ra
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4e394a98f2
avformat/rmdec: check against mismatching int4 interleaver parameters which would leave uninitialized holes
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9cf38857c0_4582_coop.ra
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
fd335aa326
avformat/rmdec: use ff_get_extradata()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b797a00f63
avformat/rmdec: zero string destination before use
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9677850d99_4635_crashed.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d04ec6ffc5
avformat/rmdec: english typos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
aaf02f6ede
avformat/rmdec: add some error messages
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f7106e00f7
avformat/rmdec: fix return code of ff_rm_parse_packet()
...
Broken by aecb9d3
Fixes assertion failure
Fixes Ticket3042
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ö
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>
11 years ago
Diego Biurrun
7df9e693a3
cosmetics: Fix ATRAC codec name spelling
11 years ago
Diego Biurrun
7950e519bb
Disable deprecation warnings for cases where a replacement is available
11 years ago
Carl Eugen Hoyos
aecb9d39bc
rmdec: Forward error messages from rm_assemble_video_frame() to the caller.
...
Fixes the cause of a null pointer dereference on oom
described in ticket #2724 .
12 years ago
Piotr Bandurski
161047f010
rmdec: fix crash in case of oom
...
Fixes ticket #2724
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d35b6cd377
rmdec: Use the AVIOContext given as parameter in rm_read_metadata()
...
This fixes crashes when playing back certain RealRTSP streams.
When invoked from the RTP depacketizer, the full realmedia
demuxer isn't invoked, but only certain functions from it, where
a separate AVIOContext is passed in as parameter (for the buffer
containing the data to parse). The functions called from within
those entry points should only be using that parameter, not
s->pb. In the depacketizer case, s is the RTSP context, where ->pb
is null.
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
bf87908cd8
rmdec: Pass AVIOContext to rm_read_metadata()
...
Fix null pointer dereference
Fixes Ticket2588
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
161dee4321
rmdec: dont return uninitialized data
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
519ebb5ee5
rmdec: flush audio packet on seeking
...
Fixes Ticket1605
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
85a5bc054c
lavf: remove disabled FF_API_R_FRAME_RATE cruft
12 years ago
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.
12 years ago
Michael Niedermayer
0780fe2740
rmdec: Limit videobufsize to remaining amount of data
...
Fixes excessive memory allocation
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Jean First
7fc73d9ab7
rmdec: fix compiler warning for uninitialized variables
...
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Piotr Bandurski
76f126ba2e
rmdec: set bit rate for ra3
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Piotr Bandurski
2e6bd22bbf
rmdec: set bit rate for ra4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
d687b8c875
Cosmetics: Reindent after last commit.
12 years ago
Carl Eugen Hoyos
00a62e6776
Do not skip three bytes and don't search for extradata in old realaudio files.
...
Fixes ticket #1557 .
12 years ago
Justin Ruggles
bfe5454cd2
lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h
12 years ago
Michael Niedermayer
3616afced6
rmdec: fix av_log level and context
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
60a585304c
rmdec: set channel layout for RA version 3
12 years ago
Michael Niedermayer
c01a462cda
rmdec: fix null derefercne
...
Fixes CID733714
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1bf5071104
rmdec: use av_assert for audio_pkt_cnt
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
7e68c91e24
rmdec: Move SIPR code shared with Matroska demuxer to a separate file
12 years ago
Diego Biurrun
72eaba5e4f
avformat: Convert some commented-out printf/av_log instances to av_dlog
12 years ago