ffmpeg: add checks in metadata to string conversion
Improves/fixes commit 1777236203f21eed7a9baade632472094c8081d3.