- fix some image encoders not consuming the input pictures like the other encoders
- fix some tests case for thumbnailing
- fix image.c leak in the error case
The main goal is to add a libvlc thumbnailing API test, which was failing without the previous changes.
Draft as it depends on !3153 (merged).