audio/rsgain: Fix segmentation fault
When calculating album loudness on a drectory containing one or more
audio files using rsgain easy ., for example, a segmentation fault
can occur.
Affects versions 3.4 and 3.5.
PR: 278838
Reported by: <pere_goriot99@yahoo.com>
MFH: 2024Q2
(cherry picked from commit 99bafb68144c1824441d3b47c3dc141c7721148b)