diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2017-09-05 16:20:44 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2017-09-06 14:19:37 -0400 |
commit | 9b2e28d91d00638e76a39ec219e99aa33241b242 (patch) | |
tree | 8367f695f6a57dcde201260c58ee9159b5c04f30 /sys/d3dvideosink | |
parent | e796a7cb974a361bd4463a71aed4e1256cfe2df6 (diff) | |
download | gstreamer-plugins-bad-9b2e28d91d00638e76a39ec219e99aa33241b242.tar.gz |
Request minimum buffer even if need_pool is FALSE
When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.
https://bugzilla.gnome.org/show_bug.cgi?id=730758
Diffstat (limited to 'sys/d3dvideosink')
-rw-r--r-- | sys/d3dvideosink/d3dvideosink.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c index 073b7743d..43e4322e1 100644 --- a/sys/d3dvideosink/d3dvideosink.c +++ b/sys/d3dvideosink/d3dvideosink.c @@ -470,6 +470,7 @@ gst_d3dvideosink_propose_allocation (GstBaseSink * bsink, GstQuery * query) return TRUE; #endif + /* FIXME re-using buffer pool breaks renegotiation */ GST_OBJECT_LOCK (sink); pool = sink->pool ? gst_object_ref (sink->pool) : NULL; GST_OBJECT_UNLOCK (sink); @@ -489,9 +490,7 @@ gst_d3dvideosink_propose_allocation (GstBaseSink * bsink, GstQuery * query) pool = NULL; } gst_structure_free (config); - } - - if (pool == NULL && need_pool) { + } else { GstVideoInfo info; if (!gst_video_info_from_caps (&info, caps)) { @@ -500,11 +499,13 @@ gst_d3dvideosink_propose_allocation (GstBaseSink * bsink, GstQuery * query) return FALSE; } - GST_DEBUG_OBJECT (sink, "create new pool"); - pool = gst_d3dsurface_buffer_pool_new (sink); - /* the normal size of a frame */ size = info.size; + } + + if (pool == NULL && need_pool) { + GST_DEBUG_OBJECT (sink, "create new pool"); + pool = gst_d3dsurface_buffer_pool_new (sink); config = gst_buffer_pool_get_config (pool); /* we need at least 2 buffer because we hold on to the last one */ @@ -516,11 +517,10 @@ gst_d3dvideosink_propose_allocation (GstBaseSink * bsink, GstQuery * query) } } - if (pool) { - /* we need at least 2 buffer because we hold on to the last one */ - gst_query_add_allocation_pool (query, pool, size, 2, 0); + /* we need at least 2 buffer because we hold on to the last one */ + gst_query_add_allocation_pool (query, pool, size, 2, 0); + if (pool) gst_object_unref (pool); - } return TRUE; } |