# HG changeset patch # User michael # Date 1157484212 0 # Node ID 12398b868e18a38ed72badc47eda8298e8a384e6 # Parent 1816e097c39f78c2cb14f493681ee50e194e4303 ignore index parameter to ignore the ODML index in avi diff -r 1816e097c39f -r 12398b868e18 avformat.h --- a/avformat.h Tue Sep 05 04:37:14 2006 +0000 +++ b/avformat.h Tue Sep 05 19:23:32 2006 +0000 @@ -342,6 +342,7 @@ int flags; #define AVFMT_FLAG_GENPTS 0x0001 ///< generate pts if missing even if it requires parsing future frames +#define AVFMT_FLAG_IGNIDX 0x0002 ///< ignore index int loop_input; /* decoding: size of data to probe; encoding unused */ diff -r 1816e097c39f -r 12398b868e18 avidec.c --- a/avidec.c Tue Sep 05 04:37:14 2006 +0000 +++ b/avidec.c Tue Sep 05 19:23:32 2006 +0000 @@ -456,7 +456,7 @@ break; case MKTAG('i', 'n', 'd', 'x'): i= url_ftell(pb); - if(!url_is_streamed(pb)){ + if(!url_is_streamed(pb) && !(s->flags & AVFMT_FLAG_IGNIDX)){ read_braindead_odml_indx(s, 0); } url_fseek(pb, i+size, SEEK_SET); diff -r 1816e097c39f -r 12398b868e18 utils.c --- a/utils.c Tue Sep 05 04:37:14 2006 +0000 +++ b/utils.c Tue Sep 05 19:23:32 2006 +0000 @@ -466,6 +466,9 @@ static const AVOption options[]={ {"probesize", NULL, OFFSET(probesize), FF_OPT_TYPE_INT, DEFAULT, 32, INT_MAX, D}, +{"fflags", NULL, OFFSET(flags), FF_OPT_TYPE_FLAGS, DEFAULT, INT_MIN, INT_MAX, D, "fflags"}, +{"ignidx", "ignore index", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_IGNIDX, INT_MIN, INT_MAX, D, "fflags"}, +{"genpts", "generate pts", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_GENPTS, INT_MIN, INT_MAX, D, "fflags"}, {NULL}, };