diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2020-10-23 10:32:18 -0400 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-10-23 14:37:27 +0000 |
commit | 23c0445b86266956f7a1138141950200fec7936d (patch) | |
tree | 4aa3c221b1d4270af48c46eafc1ab43d91e79d82 | |
parent | d3276fc47e89503c2fbafe9a9a640fb50fd4f460 (diff) | |
download | gstreamer-plugins-good-23c0445b86266956f7a1138141950200fec7936d.tar.gz |
Revert "v4l2object: Only offer inactive pools and if needed"
This reverts commit 85b9893e963ea5d342289e318daeefba35ff4a07.
This change caused a regression reported in #796. Basically the pool get
deactivated by basesrc and the encoder does not recover. Recovering with
current design would cause insertion of an unwanted keyframe.
This is being reverted in 1.18 only, a proper solution is wanted for 1.20.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/785>
-rw-r--r-- | sys/v4l2/gstv4l2object.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index da64ec060..8846e4325 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -4980,7 +4980,7 @@ no_downstream_pool: gboolean gst_v4l2_object_propose_allocation (GstV4l2Object * obj, GstQuery * query) { - GstBufferPool *pool = NULL; + GstBufferPool *pool; /* we need at least 2 buffers to operate */ guint size, min, max; GstCaps *caps; @@ -4999,12 +4999,11 @@ gst_v4l2_object_propose_allocation (GstV4l2Object * obj, GstQuery * query) switch (obj->mode) { case GST_V4L2_IO_MMAP: case GST_V4L2_IO_DMABUF: - if (need_pool && obj->pool) { - if (!gst_buffer_pool_is_active (obj->pool)) - pool = gst_object_ref (obj->pool); - } + if ((pool = obj->pool)) + gst_object_ref (pool); break; default: + pool = NULL; break; } |