]> git.sesse.net Git - ffmpeg/commit
mmaldec: limit internal buffering
authorwm4 <nfxjfg@googlemail.com>
Thu, 14 Apr 2016 10:21:26 +0000 (12:21 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sat, 30 Apr 2016 06:31:08 +0000 (08:31 +0200)
commit74beead9bd596180bcac6108548fc0a86d8eb4ae
treed66a92f984547ae7951a5a055f2787618e204f43
parent45a954f5aa35161a741fffd6c8bb92e9f91a1720
mmaldec: limit internal buffering

This uses a new MMAL feature, which limits the number of extra frames
that can be buffered within the decoder. VIDEO_MAX_NUM_CALLBACKS can
be defined as positive or negative number. Positive numbers are
absolute, and can lead to deadlocks if the user underestimates the
number of required buffers. Negative numbers specify the number of extra
buffers, e.g. -1 means no extra buffer, (-1-N) means N extra buffers.

Set a gratuitous default of -11 (N=10). This is much lower than the
firmware default, which appears to be 96.

This is backwards compatible, but needs a symbol only present in newer
firmware headers. (It's an enum item, so it requires a check in
configure.)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
configure
libavcodec/mmaldec.c