changeset 1294:12398b868e18 libavformat

ignore index parameter to ignore the ODML index in avi
author michael
date Tue, 05 Sep 2006 19:23:32 +0000
parents 1816e097c39f
children d2c766bc1b50
files avformat.h avidec.c utils.c
diffstat 3 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 */
--- 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);
--- 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},
 };