1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
Reimar Döffinger 2010-06-06 18:48:49 +00:00
parent d588e3f59b
commit c32b701749

View File

@ -481,7 +481,8 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!data_off) if (!data_off)
data_off = url_ftell(pb) - 18; 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); rm_read_index(s);
url_fseek(pb, data_off + 18, SEEK_SET); url_fseek(pb, data_off + 18, SEEK_SET);
} }