[FFmpeg-devel] [PATCH] rmdec: respect url_is_streamed and AVFMT_FLAG_IGNIDX
Kostya
kostya.shishkov
Sun Jun 6 17:39:45 CEST 2010
On Sun, Jun 06, 2010 at 12:59:41PM +0200, Reimar D?ffinger wrote:
> Hello,
> 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?
More information about the ffmpeg-devel
mailing list