msdkdec: hold a reference for the surfaces locked by msdk
previous code releases GstBuffer too earlier. so we will see
ERROR default gstmsdkvideomemory.c:77:gst_msdk_video_allocator_get_surface: failed to get surface available ERROR msdkbufferpool gstmsdkbufferpool.c:270:gst_msdk_buffer_pool_alloc_buffer: failed to create new MSDK memory
We need to hold GstBuffer reference for msdk if the surfaced locked by msdk.
step to reproduce.
- ffmpeg -f lavfi -i testsrc=duration=10:size=320x240:rate=30 -pix_fmt yuv420p -c:v libx265 test.265
- GST_GL_PLATFORM=egl gst-launch-1.0 -v filesrc location=test.265 ! h265parse ! msdkh265dec ! queue ! glimagesink