Diego Biurrun
91c9aa0941
Move some conditionally used code below the appropriate #ifdef.
14 years ago
Anton Khirnov
d2d67e424f
Remove all uses of now deprecated metadata functions.
14 years ago
Mans Rullgard
e65ab9d94f
Remove unused variables
14 years ago
Mans Rullgard
b122c65107
asfdec: add missing #include for av_bswap32()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Uoti Urpala
29fa570d0c
asfdec: fix possible overread on broken files.
14 years ago
Vladimir Pantelic
69fa23961e
asfdec: do not fall back to binary/generic search
...
asf_read_seek() inside the asf demuxer already does the
right thing, it tries the index and if that fails it uses
binary search. If binary search is called from outside of asfdec.c
it will fail because the asf code cannot clean up after itself.
Therefore introduce AVFMT_NOBINSEARCH that prevents the seek
code to fallback to binary search and AVFMT_NOGENSEARCH that
prevents the seek code to fallback to generic search.
14 years ago
Vladimir Pantelic
b58bc17cf7
asfdec: reindent after previous commit c7bd5ed
14 years ago
Vladimir Pantelic
c7bd5edae4
asfdec: fallback to binary search internally
...
lavf will do that anyway in case seek by index fails
14 years ago
Uoti Urpala
0bd433a916
asfdec: fix assert failure on invalid files
...
Add an extra size validity check in asf_read_frame_header(). Without
this asf->packet_size_left may become negative, which triggers an
assertion failure later.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Ronald S. Bultje
f8b1245922
asfdec: fix parsing of packets that overrun into padding.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Vladimir Pantelic
8408e1d7d6
asf: remove commented out code in asf_read_seek
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Biurrun
0b5ae1fdd3
asfdec: Remove dead code from asf_read_close().
14 years ago
Kostya Shishkov
2d8591c27e
make containers pass palette change in AVPacket
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 years ago
Max Horn
ca402f32e3
handle malloc failures in ff_get_wav_header
...
ff_get_wav_header is reading data from a WAVE file and then uses it
(without validation) to malloc a buffer. It then proceeded to read
data into the buffer, without verifying that the allocation succeeded.
To address this, change ff_get_wav_header to return an error if
allocation failed, and adapted all calling code to handle that error.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 years ago
Anton Khirnov
ff1ec0c3f8
avio: undeprecate av_url_read_fseek/fpause under nicer names
...
It seems their replacements won't be ready anytime soon.
14 years ago
Anton Khirnov
acaceca2f1
asfdec: remove a forgotten declaration of nonexistent function
14 years ago
Vladimir Pantelic
4377fafda1
asfdec: also subtract preroll when reading simple index object
...
This was missed when ASF was changed to return timestamps
without preroll.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Anton Khirnov
933e90a69a
avio: make av_url_read_fseek/fpause internal.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.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
Vladimir Pantelic
de11ee906e
asfdec: subtract the preroll value and thus output 0 based timestamps
...
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
3e68b3ba7b
avio: deprecate url_ferror
...
AVIOContext.error should be used directly instead.
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
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
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
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
ae628ec1fd
avio: rename ByteIOContext to AVIOContext.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Mans Rullgard
aabc2682fc
asfdec: fix build for big endian targets
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Anton Khirnov
5cbd3b5d91
asfdec: don't export empty metadata
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
8bf6db1b29
asfdec: split reading stream properties out of asf_read_header()
...
This contains a rename from gsize->size
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
0b1d291a71
asfdec: deobfuscate reading video properties size
...
This code will be later split out into a function which takes a 'size'
argument, so I'm keeping the name 'sizeX' here.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
c1fea23070
asfdec: split asf_read_header()
...
Only trivial splits are done here -- i.e. copy/paste + reindent +
missing variable declarations.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
d7a5106eb2
asfdec: skip the stream bitrate list
...
Its contents aren't used for anything.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
7c7253802b
asfdec: use an ASFContext array for storing stream bitrates
...
This will be useful for splitting asf_read_header()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
d42b09723e
asfdec: move DAR list to ASFContext
...
This will be useful for splitting asf_read_header()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
569ff02168
asfdec: remove some write-only values from the context
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Anton Khirnov
4bc328a2bd
asf: split ASFContext into muxer and demuxer parts.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e4e234fad7
asf: make ff_guidcmp inline and move it to asf.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Luca Barbato
dfd2a005eb
Replace dprintf with av_dlog
...
dprintf clashes with POSIX.1-2008
14 years ago
Anton Khirnov
042950542d
asfdec: ensure that the whole tag is read.
...
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
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
Anton Khirnov
2934cd9dbf
asfdec: remove some commented-out cruft
...
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
14 years ago
Anton Khirnov
93b78d1210
lavf: make a variant of ff_get_str16_nolen public
...
It will be useful in mp3 demuxer and hopeful some other places.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
14 years ago
Peter Ross
a750050f4c
make guid utility function visibile to other modules (ff_guidcmp, ff_get_guid)
...
Originally committed as revision 26093 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
bf09a01981
Change ASF demuxer to return incomplete last packets.
...
Whether the behaviour for streams using scrambling makes sense
is unclear.
Originally committed as revision 26053 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
4172951ba7
Return an error when get_buffer reads none or only partial data instead
...
of returning packets with uninitialized data.
Returning partial packets as for other demuxers is problematice due to
packet scrambling and thus is not done.
Originally committed as revision 25931 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
3c3ef81b9b
Ensure that packets returned from ASF demuxer are properly 0-padded.
...
Originally committed as revision 25930 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Stefan Gehrer
77b7c334be
skip top-level objects to search for the simple index in ASF files
...
Originally committed as revision 25863 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Anton Khirnov
ad7768f4c4
add ff_ prefix to metadata_conv()
...
patch by Anton Khirnov anton _at_ khirnov _dot_ net
Originally committed as revision 25505 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago