[FFmpeg-devel] [PATCH] probe max read size
Michael Niedermayer
michaelni
Mon Jun 1 22:57:15 CEST 2009
On Mon, Jun 01, 2009 at 12:36:54PM -0700, Baptiste Coudurier wrote:
> Michael Niedermayer wrote:
> > On Sun, May 31, 2009 at 02:53:34AM -0700, Baptiste Coudurier wrote:
> >> Hi,
> >>
> >> After some tests, it seems more reasonable to stop probing after some
> >> max size to avoid consuming to much memory.
> >
> > Maybe we then should replace probe_packets by a size based thing,
> > having 2 is uglier than one if one is sufficient
>
> Sure. Problem is per stream counting is not reasonable since streams
> might not have many packets present this will cause much buffering.
but without per stream counting streams starting once the threashold is
reached should fail to be probed or some streams would only be returned
at eof ...
If we want a packet limit of PL and a byte limit of BL then
init(){
counter= BL
}
...
counter -= packet.size + BL/PL;
if(counter > 0)
could be used, per stream, iam not sure if this is a good idea or if
we rather should keep 2 counter
Geometrically, this limit check has an area of a triangle that is within the
limit while the normal 2 variable check uses a rectangle, i feel that a triangle
is supperior ;)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090601/41f51c7a/attachment.pgp>
More information about the ffmpeg-devel
mailing list