[FFmpeg-devel] [PATCH 3/3] ffmpeg: try to guess a good value for the thread message queue.

Nicolas George george at nsup.org
Thu Feb 19 12:25:44 CET 2015


Le nonidi 29 pluviôse, an CCXXIII, Michael Niedermayer a écrit :
> iam a bit concerned about the possibility of this unneccesarily
> allocating a million packets
> i think IIUC this amount will actually be alloated no matter if its
> needed or not

Yes, that will allocate all the FIFO, and with 1<<20 maximum, that makes
96 megaoctets, that is too much.

On the other hand, my hardware really needs a queue size > ~500 to avoid
ALSA overruns with a simple v4l2+ALSA capture. I suspect other settings may
need even larger queues. Otherwise, the resulting capture is unusable.

Well, I suspect the maximum size should be made an option, with a reasonable
default (maybe 1024?).

It would not take too much work to make the queue size dynamic, thus only
eating memory when it is required. But it still needs a reasonable maximum
in case something goes wrong.

I will try to produce a new patch, but do not hesitate to share any thoughts
about it.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150219/4c0448ef/attachment.asc>


More information about the ffmpeg-devel mailing list