From c32b7017498bc5ab87f8b362d09112f8ade2b085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sun, 6 Jun 2010 18:48:49 +0000 Subject: [PATCH] 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. Originally committed as revision 23509 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rmdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index a91de131bc..436a7e08f2 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -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); }