diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-08-13 02:16:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-08-13 02:56:08 +0200 |
commit | 0cb233cf46e057c4d4d9352470305de3f569a036 (patch) | |
tree | fcca8a6d95237f126cb466b708da2f6c1433428f /libavformat | |
parent | 931187e117c299271df8c4caf1f8c656baf80a6b (diff) | |
parent | b2c087871dafc7d030b2d48457ddff597dfd4925 (diff) | |
download | ffmpeg-0cb233cf46e057c4d4d9352470305de3f569a036.tar.gz |
Merge commit 'b2c087871dafc7d030b2d48457ddff597dfd4925'
* commit 'b2c087871dafc7d030b2d48457ddff597dfd4925':
Move x86util.asm from libavcodec/ to libavutil/.
Move x86inc.asm to libavutil/.
APIchanges: note error_recognition in lavf
lavf: add support for error_recognition, use it in avidec, and bump minor API version
avconv: change semantics of -map
avconv: get rid of new* options.
cmdutils: allow precisely specifying a stream for AVOptions.
configure: add missing CFLAGS to fix building on the HURD
libx264: Include hint for possible values for configuring libx264
cmdutils: allow ':'-separated modifiers in option names.
avconv: make -map_metadata work consistently with the other options
avconv: remove deprecated options.
avconv: make -map_chapters accept only the input file index.
Make a copy of ffmpeg under a new name -- avconv.
ffmpeg: add a warning stating that the program is deprecated.
Add weighted motion compensation for RV40 B-frames
RV3/4: calculate B-frame motion weights once per frame
Move RV3/4-specific DSP functions into their own context
mjpeg: propagate decode errors from ff_mjpeg_decode_sos and ff_mjpeg_decode_dqt
h264: notice memory allocation failure
Conflicts:
.gitignore
Makefile
cmdutils.c
configure
doc/ffplay.texi
doc/ffprobe.texi
doc/ffserver.texi
libavcodec/libx264.c
libavformat/avformat.h
libavformat/avidec.c
libavformat/version.h
tests/lavf-regression.sh
tests/lavfi-regression.sh
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avformat.h | 8 | ||||
-rw-r--r-- | libavformat/avidec.c | 7 | ||||
-rw-r--r-- | libavformat/options.c | 3 | ||||
-rw-r--r-- | libavformat/version.h | 2 |
4 files changed, 16 insertions, 4 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 59a4240bd3..aef80e3291 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -884,6 +884,14 @@ typedef struct AVFormatContext { int fps_probe_size; /** + * Error recognition; higher values will detect more errors but may + * misdetect some more or less valid parts as errors. + * - encoding: unused + * - decoding: Set by user. + */ + int error_recognition; + + /** * Transport stream id. * This will be moved into demuxer private options. Thus no API/ABI compatibility */ diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 569d59216e..f119a1ab45 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -690,9 +690,9 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) break; case MKTAG('i', 'n', 'd', 'x'): i= avio_tell(pb); - if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) && avi->use_odml){ - read_braindead_odml_indx(s, 0); - } + if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) && avi->use_odml && + read_braindead_odml_indx(s, 0) < 0 && s->error_recognition >= FF_ER_EXPLODE){ + goto fail; } avio_seek(pb, i+size, SEEK_SET); break; case MKTAG('v', 'p', 'r', 'p'): @@ -729,6 +729,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) if(size > 1000000){ av_log(s, AV_LOG_ERROR, "Something went wrong during header parsing, " "I will ignore it and try to continue anyway.\n"); + if (s->error_recognition >= FF_ER_EXPLODE) goto fail; avi->movi_list = avio_tell(pb) - 4; avi->movi_end = avio_size(pb); goto end_of_header; diff --git a/libavformat/options.c b/libavformat/options.c index fda325c7c7..957a72010b 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -90,6 +90,9 @@ static const AVOption options[]={ {"fdebug", "print specific debug info", OFFSET(debug), FF_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, INT_MAX, E|D, "fdebug"}, {"ts", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_FDEBUG_TS }, INT_MIN, INT_MAX, E|D, "fdebug"}, {"max_delay", "maximum muxing or demuxing delay in microseconds", OFFSET(max_delay), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E|D}, +{"fer", "set error detection aggressivity", OFFSET(error_recognition), FF_OPT_TYPE_INT, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"}, +{"careful", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"}, +{"explode", "abort decoding on error recognition", 0, FF_OPT_TYPE_CONST, {.dbl = FF_ER_EXPLODE }, INT_MIN, INT_MAX, D, "fer"}, {"fpsprobesize", "number of frames used to probe fps", OFFSET(fps_probe_size), FF_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX-1, D}, {NULL}, }; diff --git a/libavformat/version.h b/libavformat/version.h index 09e52da45f..5b6031b3ec 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -24,7 +24,7 @@ #include "libavutil/avutil.h" #define LIBAVFORMAT_VERSION_MAJOR 53 -#define LIBAVFORMAT_VERSION_MINOR 6 +#define LIBAVFORMAT_VERSION_MINOR 7 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |