[FFmpeg-devel] [PATCH] rmdec: respect url_is_streamed and AVFMT_FLAG_IGNIDX

Reimar Döffinger Reimar.Doeffinger
Sun Jun 6 12:59:41 CEST 2010


Hello,
a trivial patch to disable reading of the index for streamed files
and if explicitly requested.
Index: rmdec.c
===================================================================
--- rmdec.c     (revision 23501)
+++ rmdec.c     (working copy)
@@ -481,7 +481,8 @@
 
     if (!data_off)
         data_off = url_ftell(pb) - 18;
-    if (indx_off && url_fseek(pb, indx_off, SEEK_SET) >= 0) {
+    if (indx_off && !url_is_streamed(pb) && !(s->flags & AVFMT_FLAG_IGNIDX) &&
+        url_fseek(pb, indx_off, SEEK_SET) >= 0) {
         rm_read_index(s);
         url_fseek(pb, data_off + 18, SEEK_SET);
     }



More information about the ffmpeg-devel mailing list