diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-06-06 18:48:49 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-06-06 18:48:49 +0000 |
commit | c32b7017498bc5ab87f8b362d09112f8ade2b085 (patch) | |
tree | 67de47f5e5f06686371d0742706b8a78004c4827 /libavformat/rmdec.c | |
parent | d588e3f59bf89e8da6668ea02c3808a36516c94e (diff) | |
download | ffmpeg-c32b7017498bc5ab87f8b362d09112f8ade2b085.tar.gz |
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
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r-- | libavformat/rmdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |