mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
omxvideodec: increase the minimum number of allocated buffers
Ensure that enough buffers are allocated by adding up component's own minimal plus the number of buffers requested by downstream. This should prevent buffers starvation problem if downstream elements are holding some of the buffers they required. Also simplify the check on the maximum on buffers. What we actually care about is to make sure the pool can hold the minimum of required buffers. https://bugzilla.gnome.org/show_bug.cgi?id=784479
This commit is contained in:
parent
8e0dc1d89d
commit
a3805116df
1 changed files with 3 additions and 3 deletions
|
@ -578,11 +578,11 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Need at least 2 buffers for anything meaningful */
|
/* Need at least 4 buffers for anything meaningful */
|
||||||
min = MAX (MAX (min, port->port_def.nBufferCountMin), 4);
|
min = MAX (min + port->port_def.nBufferCountMin, 4);
|
||||||
if (max == 0) {
|
if (max == 0) {
|
||||||
max = min;
|
max = min;
|
||||||
} else if (max < port->port_def.nBufferCountMin || max < 2) {
|
} else if (max < min) {
|
||||||
/* Can't use pool because can't have enough buffers */
|
/* Can't use pool because can't have enough buffers */
|
||||||
gst_caps_replace (&caps, NULL);
|
gst_caps_replace (&caps, NULL);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue