Michael Niedermayer
8a24d2cc30
avcodec/parser: Optimize ff_combine_frame() with massivly negative next
...
Fixes: Timeout
Fixes: 15558/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5705273643106304
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
15008db0fa
avcodec/parser: Check next index validity in ff_combine_frame()
...
Fixes: out of array access
Fixes: 15522/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DNXHD_fuzzer-5747756078989312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
James Almer
3735d55af3
avcodec/parser: move parsers list and related API to its own file
...
And add it to the CONFIGURABLE_COMPONENTS list in Makefile. This way, changes
to the new file will be tracked and the usual warning to suggest re-running
configure will be shown.
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Aurelien Jacobs
2505ebc632
sbc: add parser for SBC
7 years ago
Josh de Kock
7e8eba2d87
lavc: add new API for iterating codecs and codec parsers
...
Based on an unfinished patch by atomnuker.
7 years ago
James Almer
d36335bda5
avcodec/parser: use a mutex instead of atomics in av_register_codec_parser()
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Michael Niedermayer
c0607d88ee
avcodec/parser: assert that there is a past buffer if theres a reference into the past
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Clément Bœsch
549045254c
Fix all -Wformat warnings raised by DJGPP
8 years ago
Diego Biurrun
53618054b6
parser: Add missing #include for printing ISO C99 conversion specifiers
8 years ago
Diego Biurrun
0b77a59336
Use correct printf conversion specifiers for POSIX integer types
8 years ago
Rodger Combs
d13740f3a2
lavc/parser: export field order if not already set
...
Some codecs set this in the parser, but not the decoder
8 years ago
Michael Niedermayer
9f03b85045
avcodec/parser: assert that the codec id is not NONE in av_parser_parse2()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Andreas Cadhalpun
fa74cdc60d
parser: add av_assert1 to make sure the codec matches
...
Otherwise this can have some surprising effects (crashes), so let's
better not allow it.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
wm4
948f3c19a8
lavc: Make AVPacket.duration int64, and deprecate convergence_duration
...
Note that convergence_duration had another meaning, one which was in
practice never used. The only real use for it was a 64 bit replacement
for the duration field. It's better just to make duration 64 bits, and
to get rid of it.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
11aa050a25
avcodec/parser: Print an error in case of reallocation fails in ff_combine_frame()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
1ca8052640
avcodec/parser: Remove duplicate header inlcude
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Anton Khirnov
31d2039cb4
h264_parser: export video format and dimensions
10 years ago
Zhaoxiu Zeng
3b5ad8fbf7
avcodec/parser: optimize ff_mpeg4video_split()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e7d85186d6
avcodec/parser: Check that the parser return code is valid
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
8a9641a652
bsf: check memory allocations
10 years ago
Michael Niedermayer
69ee915e1c
avcodec/parser: add fuzzy mode to ff_fetch_timestamp()
...
This will be needed for the following timestamp fix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
cc769931ab
avcodec/parser: use av_freep() to avoid leaving stale pointers in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
81a663f49e
Drop remaining unneeded != NULL
...
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
53abe32409
avcodec: Mark argument in av_{parser|hwaccel|bitstream_filter}_next as const
11 years ago
Michael Niedermayer
bdadf05ec8
avcodec/parser: put lost comments back
...
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
4ec336484d
parser: cosmetics: Drop some unnecessary parentheses
11 years ago
Luca Barbato
a1c699659d
parser: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Diego Biurrun
ed61f3ca8a
parser: Remove commented-out cruft
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Michael Niedermayer
f31011e9ab
avcodec/parser: reset indexes on realloc failure
...
Fixes Ticket2982
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
08f6fdc3e4
avcodec/parser: Make av_register_codec_parser() thread safe
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
511cf612ac
miscellaneous typo fixes
12 years ago
Michael Niedermayer
096abfa150
parser: fix large overreads
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Michael Niedermayer
0393cf15db
Revert "Acquire lock when initializing parsers."
...
This reverts commit 7feef7dbca
.
This commit causes assertion failures due to use of parser_init from multiple
threads, for example indirectly by ffmpeg.c and more directly from the
packet read functions.
I dont know how to fix this quickly, and fixing ffmpeg.c leaves
the possibility of other applications being affected.
Crashing the applications until this is resolved is clearly no good
thus this revert, so we have time to think about the problem.
Crashes can be reproduced by using multiple input files in ffmpeg.
12 years ago
Reimar Döffinger
7feef7dbca
Acquire lock when initializing parsers.
...
This is necessary since they might be initializing or
even using static VLC tables.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Reimar Döffinger
92947c6d72
Use err_out label for error-case cleanup.
...
Will simplify future changes (introducing proper
locking around opening/closing parsers).
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Diego Biurrun
9a07c1332c
parser: Move Doxygen documentation to the header files
12 years ago
Michael Niedermayer
6a697b42d0
parser: fix large overreads
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
6f6b0311a3
avcodec: Drop some silly commented-out av_log() invocations
12 years ago
Martin Storsjö
6d65496990
parser: Don't use pc as context for av_dlog
...
The ParserContext class doesn't have an AVClass, required for
using it as a logging class.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Lou Logan
6851130fd6
cosmetics: minor libavcodec spelling errors
...
Also update some common misspelled words in patcheck
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Wolfram Gloger
f8353d5fda
mpegvideo: don't pretend the first frame is always a key frame
...
Signed-off-by: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
Modify the parser initialization so that parsers can
set pict_type themselves. Use this in the mpegvideo parser
so that initial frames are not unconditionally I frames.
I have had this in my tree for several years.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Rafaël Carré
b24aaabd44
remove ParseContext1
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Maksym Veremeyenko
94bf9ac473
fix av_dlog call with non-AVClass struct
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
58c42af722
doxygen: misc consistency, spelling and wording fixes
13 years ago