video can be play in the task, but display conflict when press some control button
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
If possible, add screenshots and/or videos about the current state.
I have tried a mjpeg video player with LVGL and the display is abnormal when press some control button like pause/next. I created a canvas object with the buffer for the decoded video frame and also created OS task(not lvgl task) for the video file open/decode and direct write to the buffer and then invalid the canvas in the task. The main lvgl gui is running in another OS task. I got know that LVGL is not thread-safe by default. But as the tough timing of the video frame , I have to direct write the buffer and invalid the canvas ,otherwise the frame will look like paused by some internel task of LVGL and crashed finally when changing the invalid of the canvas to the main task.
How to arrange the video task ? Would like to have your advice!