Michael Niedermayer
14d94a1952
avidec: Fix use of stream_index before validation of its range.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
4f11bed7a1
avidec: fix "avidec.c:362: warning: st may be used uninitialized in this function"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Dustin Brody
b89f8774f2
avidec: migrate last of lavf from FF_ER_* to AV_EF_*
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Michael Niedermayer
b26f0ee39f
avidec: XMPG support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Oana Stratulat
a63a86fd6f
Fixes issue 890: OOM with zmbv file
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
64cafe340b
Make the avi palette opaque.
13 years ago
Michael Niedermayer
3c7f75bd84
avidec: move eof check before continue.
...
Fixes a infinite loop
Fixes half of Ticket800
Bug found by Oana Stratulat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
62adc60b97
avidec: Check that the header chunks fit in the available filesize.
...
Fixes Ticket771
Bug found by: Diana Elena Muscalu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e098fba5d9
avidec: Fix infinite loop caused by rounding of timestamps in non interleaved avis.
...
Fixes Ticket775
Bug found by: Diana Elena Muscalu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
cd3716b9aa
Replace all uses of av_close_input_file() with avformat_close_input().
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
Victor Vasiliev
12bc20502a
Generalize RIFF INFO tag support; support reading INFO tag in wav
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Reimar Döffinger
bb3244dee2
Replace all usage of strcasecmp/strncasecmp
...
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Reimar Döffinger
96949dafcc
Replace all strcasecmp/strncasecmp usages.
...
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Michael Niedermayer
742d218bf1
avidec: Return correct error code from avi_sync() in case of IO error.
...
Found-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
ab88b25f99
lavf: use avpriv_ prefix for some dv functions.
...
They are used in libavdevice.
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
Michael Niedermayer
c4e02d3432
avidec: Dont switch to NI mode if there is no index.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
39f6733f05
Do not try to parse empty strf tags.
13 years ago
Clément Bœsch
539399d4d1
AVOptions: rename remaining FF_OPT_TYPE_* to AV_OPT_TYPE_*.
13 years ago
Mans Rullgard
1703013cb7
avidec: fix signed overflow in avi_sync()
...
Keeping byte values read from the file as unsigned is consistent
with how they are subsequently used and avoids an undefined left
shift by 24 when bit 7 is set.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Janne Grunau
2886f6759f
avidec: simplify size parameter in memset()
13 years ago
Nicolas George
71e23d39a3
avidec: Replace av_realloc by av_realloc_f when relevant.
...
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Joakim Plate
f9e083a156
avidec: Check return value of more avio_seek calls
...
The move of avio_seek in avi_read_seek is to avoiding modifying
state if the seek would fail.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Joakim Plate
53f8f0a70e
Fix for some non interleaved avi files that gets played twice or won't end
...
This changes so we assume EOF when we can't find the next
streams index entry for non interleaved file.
http://trac.xbmc.org/ticket/5585
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Joakim Plate
e42a3dd123
Allow reading of growing avi files (ie currently being written)
...
This uses the RIFF header stored size to figure out the expected AVI file size, instead
of the actual file. To work fully it requires handling failed avio_seek() instead
of assuming they always succeed.
Some fate file has been cut off and contains half a frame at the end which previously
was not output during demuxing. This frame is now output to encoder, thus fate
diff update.
13 years ago
Dustin Brody
2f63440c59
lavf: add support for error_recognition, use it in avidec, and bump minor API version
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Clément Bœsch
df2039f573
avidec: add missing initializer braces to shut up gcc warning.
...
This fixes the warning:
libavformat/avidec.c:81:5: warning: missing braces around initializer [-Wmissing-braces]
13 years ago
Michael Niedermayer
72b0c9f55f
avidec: skip seek pos adjustment for non interleaved files.
...
Fixes Ticket327
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
46eaaad8dd
Detect NI-avi at playtime like mplayer.
...
Fixes Ticket333
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
652c772981
avidec: Fix XAN DPCM demuxing.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
0ebcdf5cda
Do not include mathematics.h in avutil.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
c9403419b2
avidec: simplify convoluted flow in avi_load_index()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Alex Converse
d3f610c186
avidec: infer absolute vs relative index from first packet
14 years ago
Alex Converse
8b84af7488
avidec: Factor out the sync fucntionality.
14 years ago
Michael Niedermayer
a7e4342fc1
avidec: consider non video to contain only keyframes when seeking.
...
Fixes Ticket271
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
ami_stuff
799a87d749
avidec: Ignore unknown stream types
...
Improves ticket131
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Anton Khirnov
603b8bc2a1
Deprecate av_open_input_* and remove their uses.
...
Deprecate the last remaining member of AVFormatParameters.
14 years ago
Diego Biurrun
919d7a345a
Replace DEBUG_SEEK/DEBUG_SI + av_log combinations by av_dlog.
14 years ago
Anton Khirnov
d2d67e424f
Remove all uses of now deprecated metadata functions.
14 years ago
Diego Biurrun
d7cf5639e7
Replace some printf instances in debug code by av_log.
14 years ago
Mans Rullgard
e65ab9d94f
Remove unused variables
14 years ago
Reimar Döffinger
1795364205
Remove unused variables.
14 years ago
Michael Niedermayer
187528441a
avidec: correct frame_offset for seeking
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
5e24098b84
avidec: detect mpeg4 keyframes in indexless avi
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Reimar Döffinger
148ffcd2ce
Make DV (sub) demuxer set proper pkt->pos values.
...
This makes the avi demuxer create packets with proper pos values
with the file from ticket #140 .
14 years ago
Reimar Döffinger
1a9f9f81b1
Do not drop packets with no valid ->pos set as e.g. DV-in-AVI produces.
...
Fixes ticket #140 .
14 years ago
Michael Niedermayer
ffdc49df25
AVIDEC: use_odmc demuxer specific option. (mostly an exmaple for demuxer specific options)
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Reimar Döffinger
5e9de76f54
Do not set non_interleaved for DV-in-AVI.
...
It does not make sense (DV is interleaved by design) and
it avoids a crash when the non-interleaved code tries to
use the priv_data of streams created by the DV demuxer.
The crash could be avoided differently, but then that stream
would still lack an index and would not play correctly in
non-interleaved mode.
Fixes e.g. samples/ffmpeg-bugs/roundup/issue1514/Dennis0002_video1.avi
14 years ago