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
Michael Niedermayer
f5d039840a
avformat/swfdec: clear 4 bytes at the end of a packet if they are not initialized
...
Fixes use of uninitialized memory
Fixes part of msan_uninit-mem_7f055dd0ab1b_9558_videopop_guitar_300k.swf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e72f5abbc6
avformat/swfdec: check avio_read() return code
...
Fixes use of uninitialized memory
Fixes part of msan_uninit-mem_7f055dd0ab1b_9558_videopop_guitar_300k.swf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
fde74d1b9d
avformat/swfdec: check avio_read() return code
...
Fixes use of uninitialized memory
Fixes msan_uninit-mem_7f90d9cce964_9558_videopop_guitar_300k.swf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9225ebd50d
avformat/swfdec: return AVPROBE_SCORE_MAX / 4 for unexpected versions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ff1d81b08c
avformat/swfdec: check version and size during probing
...
Fixes probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Clément Bœsch
580e228557
lavf/swfdec: remove 8-bit audio FIXME.
...
Implemented since 624fb5f9
.
12 years ago
Clément Bœsch
624fb5f965
lavf/swfdec: support 8-bits PCM audio.
12 years ago
Clément Bœsch
9a0076f50c
lavf/swfdec: factorize the creation of a new stream.
...
This also makes the changes of a3949fe11
applicable in both cases.
12 years ago
Michael Niedermayer
d276f28b7d
swfdec: print warning when len is cliped
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
d04c17c913
swfdec: cosmetics: fix indentation
12 years ago
Justin Ruggles
e70c5b034c
swfdec: do better validation of tag length
...
Avoids trying to read a packet with 0 or negative size.
Avoids a potential infinite loop due to seeking backwards.
Partially based on a patch by Michael Niedermayer.
12 years ago
Michael Niedermayer
c73685398d
swfdec: check lens validity
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
0877f64fea
Add debug output when skipping unknown swf tags.
...
Reviewed-by: Clément Bœsch
12 years ago
Michael Niedermayer
abe68364a3
swfdec: check space before copy
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
a3949fe11f
swfdec: set channel layout
12 years ago
Clément Bœsch
711ffb84df
lavf/swfdec: support DefineBitsLossless{,2} tag.
12 years ago
Clément Bœsch
cd78192d09
lavf/swfdec: return more meaningful error codes.
12 years ago
Clément Bœsch
0c40220b9d
lavf/swfdec: fix flushing with compressed swf.
...
We now only return in the middle of the refill in case of read error, so
inflate can be re-called if zlib needs an empty (z.avail_in=0) inflate
call for flushing.
12 years ago
Michael Bradshaw
a41c824c53
Parse DEFINESOUND tags in swf (fix ticket 1638)
...
Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
11d4e92ed9
avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
12 years ago
Anton Khirnov
15c71dfd03
swf(dec): replace CODEC_ID with AV_CODEC_ID
12 years ago
Diego Biurrun
90f7e61769
swf: Move shared table out of the header file
12 years ago
Diego Biurrun
2804ba6a3b
swf: Move swf_audio_codec_tags table to the only place it is used
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
12 years ago
Clément Bœsch
588eaa106d
swfdec: support compressed swf.
13 years ago
Anton Khirnov
eaea76d72c
swfdec: do not set codec timebase.
...
It is not supposed to be set outside of lavc.
Fixes a divide by zero when the stored framerate is 0.
13 years ago
Ronald S. Bultje
31632e73f4
swf: check return values for av_get/new_packet().
...
Prevents crashers when using the packet if allocation failed.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Alex Converse
c0bc7bd1e7
swfdec: Simplify sample rate calculation.
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
84ad31ff18
lavf: replace av_new_stream->avformat_new_stream part II.
...
Manual replacements are done in this commit.
In many cases, the id is some constant made up number (e.g. 0 for video
and 1 for audio), which is then not used in the demuxer for anything.
Those ids are removed.
13 years ago
Tanami, Ohad
99d7d1510e
swfdec: return correct error code at EOF
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alex Converse
05fc9e40a4
swfdec: Add support for sample_rate_code 0 (5512 Hz)
13 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
Mans Rullgard
add41decd9
Remove return statements following infinite loops without break
...
These statements cannot be reached and are thus not needed.
This removes a number of compiler warnings.
Signed-off-by: Mans Rullgard <mans@mansr.com>
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
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
384c9c2fa7
avio: add avio_tell macro as a replacement for url_ftell
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712
)
14 years ago
Anton Khirnov
a2704c9712
avio: add avio_tell macro as a replacement for url_ftell
...
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
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
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
Anton Khirnov
471fe57e1a
avio: rename ByteIOContext to AVIOContext.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ae628ec1fd
)
14 years ago
Anton Khirnov
ae628ec1fd
avio: rename ByteIOContext to AVIOContext.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Diego Elio Pettenò
66355be3c3
Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
...
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
(cherry picked from commit c6610a216e
)
14 years ago
Diego Elio Pettenò
c6610a216e
Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
...
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
14 years ago