diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2019-01-17 16:05:05 +0800 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2019-02-24 17:59:43 +0000 |
commit | 348a4b570d5c2d5352e8de9247f648077ee1632f (patch) | |
tree | d3e2d5e3104c7777c25df4cc2d7f2bd565795af0 /sys | |
parent | b9f070f7969cb5df83587507b4fff78530b7b69e (diff) | |
download | gstreamer-plugins-bad-348a4b570d5c2d5352e8de9247f648077ee1632f.tar.gz |
msdk: move the comment to the correct place
Diffstat (limited to 'sys')
-rw-r--r-- | sys/msdk/gstmsdkbufferpool.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/msdk/gstmsdkbufferpool.c b/sys/msdk/gstmsdkbufferpool.c index d26b12511..2181f1ea6 100644 --- a/sys/msdk/gstmsdkbufferpool.c +++ b/sys/msdk/gstmsdkbufferpool.c @@ -276,11 +276,6 @@ gst_msdk_buffer_pool_acquire_buffer (GstBufferPool * pool, ret = GST_BUFFER_POOL_CLASS (parent_class)->acquire_buffer (pool, &buf, params); - /* When using video memory, mfx surface is still locked even though - * it's finished by SyncOperation. There's no way to get notified when it gets unlocked. - * So we need to confirm if it's unlocked every time a gst buffer is acquired. - * If it's still locked, we can replace it with new unlocked/unused surface. - */ if (ret != GST_FLOW_OK || priv->memory_type == GST_MSDK_MEMORY_TYPE_SYSTEM) { if (buf) *out_buffer_ptr = buf; @@ -288,6 +283,12 @@ gst_msdk_buffer_pool_acquire_buffer (GstBufferPool * pool, } surface = gst_msdk_get_surface_from_buffer (buf); + + /* When using video memory, mfx surface is still locked even though + * it's finished by SyncOperation. There's no way to get notified when it gets unlocked. + * So we need to confirm if it's unlocked every time a gst buffer is acquired. + * If it's still locked, we can replace it with new unlocked/unused surface. + */ if (!surface || surface->Data.Locked > 0) { if (!gst_msdk_video_memory_get_surface_available (gst_buffer_peek_memory (buf, 0))) { |