changeset 6101:affa412d5500 libavformat

Do not read the RM index when input is streamed (since it requires seeking forward and then back again) or AVFMT_FLAG_IGNIDX is set.
author reimar
date Sun, 06 Jun 2010 18:48:49 +0000
parents d046a7103934
children 1803559b765d
files rmdec.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rmdec.c	Sun Jun 06 18:29:42 2010 +0000
+++ b/rmdec.c	Sun Jun 06 18:48:49 2010 +0000
@@ -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);
     }