]> git.sesse.net Git - ffmpeg/commitdiff
Do not read the RM index when input is streamed (since it requires seeking
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 6 Jun 2010 18:48:49 +0000 (18:48 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 6 Jun 2010 18:48:49 +0000 (18:48 +0000)
forward and then back again) or AVFMT_FLAG_IGNIDX is set.

Originally committed as revision 23509 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/rmdec.c

index a91de131bc39b559b6d9e4ce86c3d5a84dae6460..436a7e08f2a593735d50e15ba38ed34c5f8eede1 100644 (file)
@@ -481,7 +481,8 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
     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);
     }