Encoder error: ”Qing buffer error: Device or resource busy “

Hi,
In my program I’ve encapsulated the encoder into my own class, and there are two instances in the program based on this class, one for video recording and one for preview.Video recording and preview functions will be restarted frequently during use, and the following errors often occur:

Output Plane:Error while Qing buffer: Device or resource busy

Video recording and preview in two threads

Hi,
For more information, do you use tegra_multimedia_api or gstreamer? Release version( you may run $ head -1 /etc/nv_tegra_release to show it )?

My program use tegra_multimedia_api and Release version infomation is as follows:

# R32 (release), REVISION: 1.0, GCID: 14531094, BOARD: t186ref, EABI: aarch64, DATE: Wed Mar 13 07:41:08 UTC 2019

Hi,
There are patches for video encoding + preview, although one is for r28.2.1 and the other is for r32.2.1.
https://devtalk.nvidia.com/default/topic/1062492/jetson-tx2/tegra-multimedia-samples-not-working-properly/post/5381870/#5381870
https://devtalk.nvidia.com/default/topic/1062492/jetson-tx2/tegra-multimedia-samples-not-working-properly/post/5383923/#5383923

The patch for r32.2.1 should also be good for r32.1. FYR.

Tanks a lot,
I have solved my problem by referring to the r32.2.1 patch.