[FFmpeg-devel] [PATCH] rmdec: respect url_is_streamed and AVFMT_FLAG_IGNIDX
Ronald S. Bultje
rsbultje
Sun Jun 6 19:00:38 CEST 2010
Hi,
On Sun, Jun 6, 2010 at 11:39 AM, Kostya <kostya.shishkov at gmail.com> wrote:
> On Sun, Jun 06, 2010 at 12:59:41PM +0200, Reimar D?ffinger wrote:
>> a trivial patch to disable reading of the index for streamed files
>> and if explicitly requested.
>> Index: rmdec.c
>> ===================================================================
>> --- rmdec.c ? ? (revision 23501)
>> +++ rmdec.c ? ? (working copy)
>> @@ -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);
>> ? ? ?}
>
> look ok to me, Ronald?
OK.
Ronald
More information about the ffmpeg-devel
mailing list